tesseract
5.0.0-alpha-619-ge9db
|
Go to the documentation of this file.
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_
bool Serialize(TFile *fp) const override
void add_str_int(const char *str, int number)
LSTM(const STRING &name, int num_inputs, int num_states, int num_outputs, bool two_dimensional, NetworkType type)
void ConvertToInt() override
bool DeSerialize(TFile *fp) override
STRING spec() const override
StaticShape OutputShape(const StaticShape &input_shape) const override
void SetEnableTraining(TrainingState state) override
void Update(float learning_rate, float momentum, float adam_beta, int num_samples) override
void CountAlternators(const Network &other, double *same, double *changed) const override
STRING spec() const override
bool Backward(bool debug, const NetworkIO &fwd_deltas, NetworkScratch *scratch, NetworkIO *back_deltas) override
const STRING & name() const
int RemapOutputs(int old_no, const std::vector< int > &code_map) override
void DebugWeights() override
int InitWeights(float range, TRand *randomizer) override
void Forward(bool debug, const NetworkIO &input, const TransposedArray *input_transpose, NetworkScratch *scratch, NetworkIO *output) override