Question: ( 2 ) Problem 4 Bookmark this page Final due Sep 9 , 2 0 2 4 0 7 : 5 9 E n T

(2) Problem 4
Bookmark this page
Final due Sep9,202407:59EnT
Recurrent neural networks iriviv/ vai ve useu as ciassimamui iumeis iui mile seiles data. Here we have a
simple RNN as shown in the figure above, where
st=f1(Ws,sst-1+Ws,x2xt),t=1,2,dots,T
and
y=f2(W1yssT+W0)
We assume all offsets are 0 except W0 for the final output layer and we decide the two activation functions to
be:
f1(z)=RELU(z)=max(0,z)
and
f2(z)=sign(z)={1,ifz00,ifz0
Note that the RELU (z) can be applied elementwise if z is a vector.
Suppose we want to apply this model to classify sentences into different categories (e.g. positive/negative
sentiment), we need to encode each word in a sentence into a vector as the input xt to the model. One way to
do this is to represent the t th word as a column vector of length |V|, where V is the set of the entire
vocabulary. The i th element of xt is 1 if the word is the i th word in the vocabulary and all other elements are
zero.
3 points possible (graded, results hidden)
Now compute the final hidden state sT(1),sT(2),sT(3) for each of the three senteces AA,ABB,BAA in this
RNN.
(Enter ,0 for ST=[0,0]T?T.)
sT(1)=
sT(2)=
sT(3)=
( 2 ) Problem 4 Bookmark this page Final due Sep

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!