19 #ifndef TESSERACT_LSTM_LSTM_H_ 20 #define TESSERACT_LSTM_LSTM_H_ 50 LSTM(
const STRING&
name,
int num_inputs,
int num_states,
int num_outputs,
68 if (softmax_ !=
nullptr)
spec += softmax_->
spec();
81 int RemapOutputs(
int old_no,
const std::vector<int>& code_map)
override;
106 void Update(
float learning_rate,
float momentum,
float adam_beta,
107 int num_samples)
override;
112 double* changed)
const override;
125 void ResizeForward(
const NetworkIO& input);
162 #endif // TESSERACT_LSTM_LSTM_H_ LSTM(const STRING &name, int num_inputs, int num_states, int num_outputs, bool two_dimensional, NetworkType type)
void Update(float learning_rate, float momentum, float adam_beta, int num_samples) override
void Forward(bool debug, const NetworkIO &input, const TransposedArray *input_transpose, NetworkScratch *scratch, NetworkIO *output) override
int RemapOutputs(int old_no, const std::vector< int > &code_map) override
void ConvertToInt() override
bool Serialize(TFile *fp) const override
bool DeSerialize(TFile *fp) override
StaticShape OutputShape(const StaticShape &input_shape) const override
bool Backward(bool debug, const NetworkIO &fwd_deltas, NetworkScratch *scratch, NetworkIO *back_deltas) override
void SetEnableTraining(TrainingState state) override
const STRING & name() const
void CountAlternators(const Network &other, double *same, double *changed) const override
void add_str_int(const char *str, int number)
STRING spec() const override
int InitWeights(float range, TRand *randomizer) override
void DebugWeights() override
STRING spec() const override