GeezerVison is showing github.com — all fixes suggested by Pascal, plus update for the doc · alabarga/DeepLearningTutorials@226729f
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: code/SdA.py +1-2Lines changed: 1 addition & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -394,8 +394,7 @@ def test_SdA(finetune_lr=0.1, pretraining_epochs=15, | 394 | 394 | c.append(pretraining_fns[i](index=batch_index, | 395 | 395 | corruption=corruption_levels[i], | 396 | 396 | lr=pretrain_lr)) | 397 | | - print('Pre-training layer %i, epoch %d, cost ' % (i, epoch)) | 398 | | - print(numpy.mean(c)) | | 397 | + print('Pre-training layer %i, epoch %d, cost %f' % (i, epoch, numpy.mean(c))) | 399 | 398 |
| 400 | 399 | end_time = timeit.default_timer() | 401 | 400 |
| |
Collapse file Copy file name to clipboardExpand all lines: code/lstm.py -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 6 | 6 | from six.moves import xrange | 7 | 7 | import six.moves.cPickle as pickle | 8 | 8 |
| 9 | | -#from six.moves.collections import OrderedDict | 10 | 9 | from collections import OrderedDict | 11 | 10 | import sys | 12 | 11 | import time | |
Collapse file Copy file name to clipboardExpand all lines: code/rnnslu.py +4-4Lines changed: 4 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -333,8 +333,8 @@ def main(param=None): | 333 | 333 | for i, (x, y) in enumerate(zip(train_lex, train_y)): | 334 | 334 | rnn.train(x, y, param['win'], param['clr']) | 335 | 335 | print('[learning] epoch %i >> %2.2f%%' % ( | 336 | | - e, (i + 1) * 100. / nsentences),) | 337 | | - print('completed in %.2f (sec) <<\r' % (timeit.default_timer() - tic),) | | 336 | + e, (i + 1) * 100. / nsentences), end=' ') | | 337 | + print('completed in %.2f (sec) <<\r' % (timeit.default_timer() - tic), end='') | 338 | 338 | sys.stdout.flush() | 339 | 339 |
| 340 | 340 | # evaluation // back into the real world : idx -> words | @@ -393,10 +393,10 @@ def main(param=None): | 393 | 393 | if param['clr'] < 1e-5: | 394 | 394 | break | 395 | 395 |
| 396 | | - print(('BEST RESULT: epoch', param['be'], | | 396 | + print('BEST RESULT: epoch', param['be'], | 397 | 397 | 'valid F1', param['vf1'], | 398 | 398 | 'best test F1', param['tf1'], | 399 | | - 'with the model', folder)) | | 399 | + 'with the model', folder) | 400 | 400 |
| 401 | 401 |
| 402 | 402 | if __name__ == '__main__': | |
Collapse file Copy file name to clipboardExpand all lines: doc/index.txt +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -63,3 +63,6 @@ Energy-based recurrent neural network (RNN-RBM): | 63 | 63 | .. _Theano basic tutorial: http://deeplearning.net/software/theano/tutorial | 64 | 64 |
| 65 | 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 | + |
|