Skip to content

Commit

Permalink
Fixed regression of issue #644 again!
Browse files Browse the repository at this point in the history
  • Loading branch information
rays committed Jul 16, 2017
1 parent f4f66f8 commit 45fb7dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lstm/lstmtrainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@ STRING LSTMTrainer::UpdateErrorGraph(int iteration, double error_rate,
if (error_rate > best_error_rate_
&& iteration < best_iteration_ + kErrorGraphInterval) {
// Too soon to record a new point.
if (tester != NULL) {
if (tester != NULL && !worst_model_data_.empty()) {
mgr_.OverwriteEntry(TESSDATA_LSTM, &worst_model_data_[0],
worst_model_data_.size());
return tester->Run(worst_iteration_, NULL, mgr_, CurrentTrainingStage());
Expand Down

0 comments on commit 45fb7dd

Please sign in to comment.