Skip to content

Commit 3d9b1ac

Browse files
committed
fix the display of the number of example seen
1 parent 8afe749 commit 3d9b1ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code/lstm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,6 @@ def test_lstm(
461461
shuffle=True)
462462

463463
for _, train_index in kf:
464-
n_samples += train_index.shape[0]
465464
uidx += 1
466465
use_noise.set_value(1.)
467466

@@ -475,6 +474,7 @@ def test_lstm(
475474
if x is None:
476475
print 'Minibatch with zero sample under length ', maxlen
477476
continue
477+
n_samples += x.shape[1]
478478

479479
cost = f_grad_shared(x, mask, y)
480480
f_update(lrate)

0 commit comments

Comments
 (0)