diff --git a/lstm/lstmtrainer.cpp b/lstm/lstmtrainer.cpp index 42e43162ce..3976b8a79c 100644 --- a/lstm/lstmtrainer.cpp +++ b/lstm/lstmtrainer.cpp @@ -147,7 +147,7 @@ void LSTMTrainer::InitCharSet(const UNICHARSET& unicharset, // ctc_mode controls how the truth text is mapped to the network targets. // Note: Call before InitNetwork! void LSTMTrainer::InitCharSet(const UNICHARSET& unicharset, - const UnicharCompress recoder) { + const UnicharCompress& recoder) { EmptyConstructor(); int flags = TF_COMPRESS_UNICHARSET; training_flags_ = static_cast(flags); diff --git a/lstm/lstmtrainer.h b/lstm/lstmtrainer.h index 918c0381be..c60405076d 100644 --- a/lstm/lstmtrainer.h +++ b/lstm/lstmtrainer.h @@ -113,7 +113,7 @@ class LSTMTrainer : public LSTMRecognizer { // previously setup UNICHARSET and UnicharCompress. // ctc_mode controls how the truth text is mapped to the network targets. // Note: Call before InitNetwork! - void InitCharSet(const UNICHARSET& unicharset, const UnicharCompress recoder); + void InitCharSet(const UNICHARSET& unicharset, const UnicharCompress& recoder); // Initializes the trainer with a network_spec in the network description // net_flags control network behavior according to the NetworkFlags enum.