Skip to content

Commit 970b9a1

Browse files
committed
Merge pull request lisa-lab#59 from kyunghyuncho/master
early stop kicks in only after patience+1 validation runs
2 parents 9e28dd6 + 7c23975 commit 970b9a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code/lstm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ def train(dim_proj=100,
558558

559559
best_p = unzip(tparams)
560560
bad_counter = 0
561-
if (eidx > patience and
561+
if (len(history_errs) > patience and
562562
valid_err >= numpy.array(history_errs)[:-patience,
563563
0].min()):
564564
bad_counter += 1

0 commit comments

Comments
 (0)