We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b6f0b9 commit f4f66f8Copy full SHA for f4f66f8
lstm/lstmtrainer.h
@@ -301,6 +301,7 @@ class LSTMTrainer : public LSTMRecognizer {
301
// language model. trainer is the model that is restored.
302
bool ReadTrainingDump(const GenericVector<char>& data,
303
LSTMTrainer* trainer) const {
304
+ if (data.empty()) return false;
305
return ReadSizedTrainingDump(&data[0], data.size(), trainer);
306
}
307
bool ReadSizedTrainingDump(const char* data, int size,
0 commit comments