Skip to content

Commit ed02dd9

Browse files
author
Grégoire
committed
idxs fix rather than scan
1 parent 4f7d884 commit ed02dd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/rnnslu.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ It gives the following code::
268268
Then we integrate the way to build the input from the embedding matrix::
269269

270270
idxs = T.imatrix() # as many columns as context window size/lines as words in the sentence
271-
x, _ = theano.scan(fn=lambda idx: self.emb[idx].flatten(), sequences=idxs)
271+
x = self.emb[idxs].reshape((idxs.shape[0], de*cs))
272272
y = T.ivector('y') # label
273273

274274
We use the scan operator to construct the recursion, works like a charm::

0 commit comments

Comments
 (0)