提交 ec87dd4d 编写于 作者: S Stefan Weil

Abort LSTM training with integer model (fixes issue #1573)

Tesseract currently cannot continue LSTM training from an
integer (fast) model.

Report this to users who try it nevertheless instead of crashing
with an assertion.
Signed-off-by: NStefan Weil <sw@weilnetz.de>
上级 b5d4b67a
......@@ -105,6 +105,10 @@ bool LSTMTrainer::TryLoadingCheckpoint(const char *filename, const char *old_tra
if (!ReadTrainingDump(data, *this)) {
return false;
}
if (IsIntMode()) {
tprintf("Error, %s is an integer (fast) model, cannot continue training\n", filename);
return false;
}
if (((old_traineddata == nullptr || *old_traineddata == '\0') &&
network_->NumOutputs() == recoder_.code_range()) ||
filename == old_traineddata) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册