Skip to content

Commit 86162c6

Browse files
author
Grégoire
committed
add timing output
1 parent 6568c73 commit 86162c6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

code/rnnslu.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,9 @@ def main(param):
277277

278278
for i, (x, y) in enumerate(zip(train_lex, train_y)):
279279
rnn.train(x, y, param['win'], param['clr'])
280-
280+
print '[learning] epoch %i >> %2.2f%%'%(e,(i+1)*100./nsentences),'completed in %.2f (sec) <<\r'%(time.time()-tic),
281+
sys.stdout.flush()
282+
281283
# evaluation // back into the real world : idx -> words
282284
predictions_test = [map(lambda x: idx2label[x],
283285
rnn.classify(numpy.asarray(

0 commit comments

Comments
 (0)