Skip to content

Commit

Permalink
Removed errors introduced by git merge
Browse files Browse the repository at this point in the history
  • Loading branch information
theraysmith committed Aug 2, 2017
1 parent 4e9665d commit 39b168a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
6 changes: 1 addition & 5 deletions lstm/lstmtrainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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') &&
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
}

Expand Down
5 changes: 0 additions & 5 deletions lstm/lstmtrainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions training/lstmtraining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 39b168a

Please sign in to comment.