We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0d80529 + 8b1e2b3 commit eb3f6f9Copy full SHA for eb3f6f9
2 files changed
code/lstm.py
@@ -569,7 +569,7 @@ def train_lstm(
569
f_update(lrate)
570
571
if numpy.isnan(cost) or numpy.isinf(cost):
572
- print 'NaN detected'
+ print 'bad cost detected: ', cost
573
return 1., 1., 1.
574
575
if numpy.mod(uidx, dispFreq) == 0:
@@ -595,7 +595,7 @@ def train_lstm(
595
596
history_errs.append([valid_err, test_err])
597
598
- if (uidx == 0 or
+ if (best_p is None or
599
valid_err <= numpy.array(history_errs)[:,
600
0].min()):
601
code/test.py
@@ -87,7 +87,7 @@ def speed():
87
# 7.1-2 (python 2.7.2, mkl unknow). BLAS with only 1 thread.
88
89
expected_times_64 = numpy.asarray([9.8, 22.0, 76.1, 73.7, 116.4,
90
- 346.9, 355.0, 558.1, 130.4, 50.8, 113.6])
+ 346.9, 355.0, 558.1, 130.4, 23.2, 106])
91
expected_times_32 = numpy.asarray([8.1, 17.9, 42.5, 66.5, 71,
92
191.2, 199.0, 432.8, 119.5, 36.9, 78.0])
93
@@ -110,7 +110,7 @@ def speed():
110
111
expected_times_gpu = numpy.asarray([3.0, 7.55523491, 18.99226785,
112
5.8, 20.0,
113
- 11.8, 18.2, 280.1, 132.8, 38.8, 10.5])
+ 11.2, 17.2, 257.7, 118.8, 34.2, 8.7])
114
expected_times_64 = [s for idx, s in enumerate(expected_times_64)
115
if to_exec[idx]]
116
expected_times_32 = [s for idx, s in enumerate(expected_times_32)
0 commit comments