We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c610d3 commit 226729fCopy full SHA for 226729f
code/SdA.py
@@ -394,8 +394,7 @@ def test_SdA(finetune_lr=0.1, pretraining_epochs=15,
394
c.append(pretraining_fns[i](index=batch_index,
395
corruption=corruption_levels[i],
396
lr=pretrain_lr))
397
- print('Pre-training layer %i, epoch %d, cost ' % (i, epoch))
398
- print(numpy.mean(c))
+ print('Pre-training layer %i, epoch %d, cost %f' % (i, epoch, numpy.mean(c)))
399
400
end_time = timeit.default_timer()
401
code/lstm.py
@@ -6,7 +6,6 @@
6
from six.moves import xrange
7
import six.moves.cPickle as pickle
8
9
-#from six.moves.collections import OrderedDict
10
from collections import OrderedDict
11
import sys
12
import time
code/rnnslu.py
@@ -333,8 +333,8 @@ def main(param=None):
333
for i, (x, y) in enumerate(zip(train_lex, train_y)):
334
rnn.train(x, y, param['win'], param['clr'])
335
print('[learning] epoch %i >> %2.2f%%' % (
336
- e, (i + 1) * 100. / nsentences),)
337
- print('completed in %.2f (sec) <<\r' % (timeit.default_timer() - tic),)
+ e, (i + 1) * 100. / nsentences), end=' ')
+ print('completed in %.2f (sec) <<\r' % (timeit.default_timer() - tic), end='')
338
sys.stdout.flush()
339
340
# evaluation // back into the real world : idx -> words
@@ -393,10 +393,10 @@ def main(param=None):
393
if param['clr'] < 1e-5:
break
- print(('BEST RESULT: epoch', param['be'],
+ print('BEST RESULT: epoch', param['be'],
'valid F1', param['vf1'],
'best test F1', param['tf1'],
- 'with the model', folder))
+ 'with the model', folder)
402
if __name__ == '__main__':
doc/index.txt
@@ -63,3 +63,6 @@ Energy-based recurrent neural network (RNN-RBM):
63
.. _Theano basic tutorial: http://deeplearning.net/software/theano/tutorial
64
65
.. _Contractive auto-encoders: https://github.com/lisa-lab/DeepLearningTutorials/blob/master/code/cA.py
66
+
67
+Note that the tutorials here are all compatible with Python 2 and 3, with the exception of :ref:`rnnrbm` which is only available for Python 2.
68
0 commit comments