19 #ifndef TESSERACT_LSTM_FULLYCONNECTED_H_ 20 #define TESSERACT_LSTM_FULLYCONNECTED_H_ 73 int RemapOutputs(
int old_no,
const std::vector<int>& code_map)
override;
95 void ForwardTimeStep(
const double* d_input,
int t,
double* output_line);
96 void ForwardTimeStep(
const int8_t* i_input,
int t,
double* output_line);
109 void Update(
float learning_rate,
float momentum,
float adam_beta,
110 int num_samples)
override;
115 double* changed)
const override;
136 #endif // TESSERACT_LSTM_FULLYCONNECTED_H_
bool DeSerialize(TFile *fp) override
FullyConnected(const STRING &name, int ni, int no, NetworkType type)
void ConvertToInt() override
void ChangeType(NetworkType type)
bool Serialize(TFile *fp) const override
void BackwardTimeStep(const NetworkIO &fwd_deltas, int t, double *curr_errors, TransposedArray *errors_t, double *backprop)
void Forward(bool debug, const NetworkIO &input, const TransposedArray *input_transpose, NetworkScratch *scratch, NetworkIO *output) override
int InitWeights(float range, TRand *randomizer) override
bool Backward(bool debug, const NetworkIO &fwd_deltas, NetworkScratch *scratch, NetworkIO *back_deltas) override
int RemapOutputs(int old_no, const std::vector< int > &code_map) override
virtual ~FullyConnected()=default
void DebugWeights() override
void SetEnableTraining(TrainingState state) override
const TransposedArray * external_source_
const STRING & name() const
StaticShape OutputShape(const StaticShape &input_shape) const override
void add_str_int(const char *str, int number)
STRING spec() const override
void ForwardTimeStep(int t, double *output_line)
void FinishBackward(const TransposedArray &errors_t)
void CountAlternators(const Network &other, double *same, double *changed) const override
void Update(float learning_rate, float momentum, float adam_beta, int num_samples) override
TransposedArray source_t_
void SetupForward(const NetworkIO &input, const TransposedArray *input_transpose)