From f4f66f8fa94fe5a99aa918ed59d4895ac564c02d Mon Sep 17 00:00:00 2001 From: rays Date: Sat, 15 Jul 2017 17:21:47 -0700 Subject: [PATCH] Fixed regression of issue #644 --- lstm/lstmtrainer.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lstm/lstmtrainer.h b/lstm/lstmtrainer.h index 41ea32d68c..65df18afd6 100644 --- a/lstm/lstmtrainer.h +++ b/lstm/lstmtrainer.h @@ -301,6 +301,7 @@ class LSTMTrainer : public LSTMRecognizer { // language model. trainer is the model that is restored. bool ReadTrainingDump(const GenericVector& data, LSTMTrainer* trainer) const { + if (data.empty()) return false; return ReadSizedTrainingDump(&data[0], data.size(), trainer); } bool ReadSizedTrainingDump(const char* data, int size,