We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0d80529 commit 5b62a38Copy full SHA for 5b62a38
1 file 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
0 commit comments