Skip to content

Commit f4f66f8

Browse files
author
rays
committed
Fixed regression of issue #644
1 parent 4b6f0b9 commit f4f66f8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lstm/lstmtrainer.h

+1
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ class LSTMTrainer : public LSTMRecognizer {
301301
// language model. trainer is the model that is restored.
302302
bool ReadTrainingDump(const GenericVector<char>& data,
303303
LSTMTrainer* trainer) const {
304+
if (data.empty()) return false;
304305
return ReadSizedTrainingDump(&data[0], data.size(), trainer);
305306
}
306307
bool ReadSizedTrainingDump(const char* data, int size,

0 commit comments

Comments
 (0)