tesseract
5.0.0-alpha-619-ge9db
|
Go to the documentation of this file.
18 #ifndef TESSERACT_LSTM_NETWORK_H_
19 #define TESSERACT_LSTM_NETWORK_H_
186 virtual int RemapOutputs(
int old_no,
const std::vector<int>& code_map) {
230 virtual void Update(
float learning_rate,
float momentum,
float adam_beta,
236 double* changed)
const {}
281 static void ClearWindow(
bool tess_coords,
const char* window_name,
290 double Random(
double range);
310 #endif // TESSERACT_LSTM_NETWORK_H_
virtual bool Backward(bool debug, const NetworkIO &fwd_deltas, NetworkScratch *scratch, NetworkIO *back_deltas)=0
virtual void SetRandomizer(TRand *randomizer)
virtual ~Network()=default
void DisplayForward(const NetworkIO &matrix)
virtual void SetEnableTraining(TrainingState state)
bool needs_to_backprop() const
virtual int InitWeights(float range, TRand *randomizer)
virtual int XScaleFactor() const
ScrollView * backward_win_
virtual int RemapOutputs(int old_no, const std::vector< int > &code_map)
virtual bool SetupNeedsBackprop(bool needs_backprop)
virtual void DebugWeights()=0
bool TestFlag(NetworkFlags flag) const
virtual void CacheXScaleFactor(int factor)
virtual StaticShape OutputShape(const StaticShape &input_shape) const
static Network * CreateFromFile(TFile *fp)
virtual void ConvertToInt()
ScrollView * forward_win_
virtual StaticShape InputShape() const
virtual void SetNetworkFlags(uint32_t flags)
const STRING & name() const
static void ClearWindow(bool tess_coords, const char *window_name, int width, int height, ScrollView **window)
virtual void Update(float learning_rate, float momentum, float adam_beta, int num_samples)
static int DisplayImage(Pix *pix, ScrollView *window)
virtual STRING spec() const
double Random(double range)
virtual bool Serialize(TFile *fp) const
virtual bool IsPlumbingType() const
virtual void CountAlternators(const Network &other, double *same, double *changed) const
void DisplayBackward(const NetworkIO &matrix)
void set_depth(int value)
virtual void Forward(bool debug, const NetworkIO &input, const TransposedArray *input_transpose, NetworkScratch *scratch, NetworkIO *output)=0
virtual bool DeSerialize(TFile *fp)=0