提交 39b168a0 编写于 作者: R Ray Smith

Removed errors introduced by git merge

上级 4e9665de
......@@ -128,9 +128,6 @@ bool LSTMTrainer::TryLoadingCheckpoint(const char* filename,
GenericVector<char> data;
if (!(*file_reader_)(filename, &data)) return false;
tprintf("Loaded file %s, unpacking...\n", filename);
<<<<<<< Updated upstream
return checkpoint_reader_->Run(data, this);
=======
if (!checkpoint_reader_->Run(data, this)) return false;
StaticShape shape = network_->OutputShape(network_->InputShape());
if (((old_traineddata == nullptr || *old_traineddata == '\0') &&
......@@ -161,7 +158,6 @@ bool LSTMTrainer::TryLoadingCheckpoint(const char* filename,
network_->RemapOutputs(old_recoder.code_range(), code_map);
tprintf("Previous null char=%d mapped to %d\n", old_null_char, null_char_);
return true;
>>>>>>> Stashed changes
}
// Initializes the trainer with a network_spec in the network description
......@@ -954,7 +950,7 @@ STRING LSTMTrainer::DumpFilename() const {
STRING filename;
filename.add_str_double(model_base_.string(), best_error_rate_);
filename.add_str_int("_", best_iteration_);
filename += ".lstm";
filename += ".checkpoint";
return filename;
}
......
......@@ -98,15 +98,10 @@ class LSTMTrainer : public LSTMRecognizer {
virtual ~LSTMTrainer();
// Tries to deserialize a trainer from the given file and silently returns
<<<<<<< Updated upstream
// false in case of failure.
bool TryLoadingCheckpoint(const char* filename);
=======
// false in case of failure. If old_traineddata is not null, then it is
// assumed that the character set is to be re-mapped from old_traininddata to
// the new, with consequent change in weight matrices etc.
bool TryLoadingCheckpoint(const char* filename, const char* old_traineddata);
>>>>>>> Stashed changes
// Initializes the character set encode/decode mechanism directly from a
// previously setup traineddata containing dawgs, UNICHARSET and
......
......@@ -57,11 +57,8 @@ BOOL_PARAM_FLAG(debug_network, false,
INT_PARAM_FLAG(max_iterations, 0, "If set, exit after this many iterations");
STRING_PARAM_FLAG(traineddata, "",
"Combined Dawgs/Unicharset/Recoder for language model");
<<<<<<< Updated upstream
=======
STRING_PARAM_FLAG(old_traineddata, "",
"Previous traineddata arg when changing the character set");
>>>>>>> Stashed changes
// Number of training images to train between calls to MaintainCheckpoints.
const int kNumPagesPerBatch = 100;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册