Skip to content

Commit 35dee46

Browse files
authored
Merge pull request #3549 from stweil/issue1573
Abort LSTM training with integer model (fixes issue #1573)
2 parents b5d4b67 + ec87dd4 commit 35dee46

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/training/unicharset/lstmtrainer.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ bool LSTMTrainer::TryLoadingCheckpoint(const char *filename, const char *old_tra
105105
if (!ReadTrainingDump(data, *this)) {
106106
return false;
107107
}
108+
if (IsIntMode()) {
109+
tprintf("Error, %s is an integer (fast) model, cannot continue training\n", filename);
110+
return false;
111+
}
108112
if (((old_traineddata == nullptr || *old_traineddata == '\0') &&
109113
network_->NumOutputs() == recoder_.code_range()) ||
110114
filename == old_traineddata) {

0 commit comments

Comments
 (0)