GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — all fixes suggested by Pascal, plus update for the doc · alabarga/DeepLearningTutorials@226729f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • code
    • SdA.py
    • lstm.py
    • rnnslu.py
  • doc
    • index.txt
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎code/SdA.py‎

Copy file name to clipboardExpand all lines: code/SdA.py
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,7 @@ def test_SdA(finetune_lr=0.1, pretraining_epochs=15,
394394
c.append(pretraining_fns[i](index=batch_index,
395395
corruption=corruption_levels[i],
396396
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)))
399398

400399
end_time = timeit.default_timer()
401400

Collapse file

‎code/lstm.py‎

Copy file name to clipboardExpand all lines: code/lstm.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from six.moves import xrange
77
import six.moves.cPickle as pickle
88

9-
#from six.moves.collections import OrderedDict
109
from collections import OrderedDict
1110
import sys
1211
import time
Collapse file

‎code/rnnslu.py‎

Copy file name to clipboardExpand all lines: code/rnnslu.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,8 @@ def main(param=None):
333333
for i, (x, y) in enumerate(zip(train_lex, train_y)):
334334
rnn.train(x, y, param['win'], param['clr'])
335335
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='')
338338
sys.stdout.flush()
339339

340340
# evaluation // back into the real world : idx -> words
@@ -393,10 +393,10 @@ def main(param=None):
393393
if param['clr'] < 1e-5:
394394
break
395395

396-
print(('BEST RESULT: epoch', param['be'],
396+
print('BEST RESULT: epoch', param['be'],
397397
'valid F1', param['vf1'],
398398
'best test F1', param['tf1'],
399-
'with the model', folder))
399+
'with the model', folder)
400400

401401

402402
if __name__ == '__main__':
Collapse file

‎doc/index.txt‎

Copy file name to clipboardExpand all lines: doc/index.txt
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,6 @@ Energy-based recurrent neural network (RNN-RBM):
6363
.. _Theano basic tutorial: http://deeplearning.net/software/theano/tutorial
6464

6565
.. _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

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.