tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
tesseract::Maxpool Class Reference

#include <maxpool.h>

Inheritance diagram for tesseract::Maxpool:
Collaboration diagram for tesseract::Maxpool:

Public Member Functions

 Maxpool (const STRING &name, int ni, int x_scale, int y_scale)
 
virtual ~Maxpool ()=default
 
STRING spec () const override
 
bool DeSerialize (TFile *fp) override
 
void Forward (bool debug, const NetworkIO &input, const TransposedArray *input_transpose, NetworkScratch *scratch, NetworkIO *output) override
 
bool Backward (bool debug, const NetworkIO &fwd_deltas, NetworkScratch *scratch, NetworkIO *back_deltas) override
 
- Public Member Functions inherited from tesseract::Reconfig
 Reconfig (const STRING &name, int ni, int x_scale, int y_scale)
 
virtual ~Reconfig ()=default
 
StaticShape OutputShape (const StaticShape &input_shape) const override
 
STRING spec () const override
 
int XScaleFactor () const override
 
bool Serialize (TFile *fp) const override
 
bool DeSerialize (TFile *fp) override
 
void Forward (bool debug, const NetworkIO &input, const TransposedArray *input_transpose, NetworkScratch *scratch, NetworkIO *output) override
 
bool Backward (bool debug, const NetworkIO &fwd_deltas, NetworkScratch *scratch, NetworkIO *back_deltas) override
 
- Public Member Functions inherited from tesseract::Network
 Network ()
 
 Network (NetworkType type, const STRING &name, int ni, int no)
 
virtual ~Network ()=default
 
NetworkType type () const
 
bool IsTraining () const
 
bool needs_to_backprop () const
 
int num_weights () const
 
int NumInputs () const
 
int NumOutputs () const
 
virtual StaticShape InputShape () const
 
const STRINGname () const
 
bool TestFlag (NetworkFlags flag) const
 
virtual bool IsPlumbingType () const
 
virtual void SetEnableTraining (TrainingState state)
 
virtual void SetNetworkFlags (uint32_t flags)
 
virtual int InitWeights (float range, TRand *randomizer)
 
virtual int RemapOutputs (int old_no, const std::vector< int > &code_map)
 
virtual void ConvertToInt ()
 
virtual void SetRandomizer (TRand *randomizer)
 
virtual bool SetupNeedsBackprop (bool needs_backprop)
 
virtual void CacheXScaleFactor (int factor)
 
virtual void DebugWeights ()
 
virtual void Update (float learning_rate, float momentum, float adam_beta, int num_samples)
 
virtual void CountAlternators (const Network &other, double *same, double *changed) const
 
void DisplayForward (const NetworkIO &matrix)
 
void DisplayBackward (const NetworkIO &matrix)
 

Private Attributes

GENERIC_2D_ARRAY< int > maxes_
 

Additional Inherited Members

- Static Public Member Functions inherited from tesseract::Network
static NetworkCreateFromFile (TFile *fp)
 
static void ClearWindow (bool tess_coords, const char *window_name, int width, int height, ScrollView **window)
 
static int DisplayImage (Pix *pix, ScrollView *window)
 
- Protected Member Functions inherited from tesseract::Network
double Random (double range)
 
- Protected Attributes inherited from tesseract::Reconfig
StrideMap back_map_
 
int32_t x_scale_
 
int32_t y_scale_
 
- Protected Attributes inherited from tesseract::Network
NetworkType type_
 
TrainingState training_
 
bool needs_to_backprop_
 
int32_t network_flags_
 
int32_t ni_
 
int32_t no_
 
int32_t num_weights_
 
STRING name_
 
ScrollViewforward_win_
 
ScrollViewbackward_win_
 
TRandrandomizer_
 
- Static Protected Attributes inherited from tesseract::Network
static char const *const kTypeNames [NT_COUNT]
 

Constructor & Destructor Documentation

◆ Maxpool()

tesseract::Maxpool::Maxpool ( const STRING name,
int  ni,
int  x_scale,
int  y_scale 
)

◆ ~Maxpool()

virtual tesseract::Maxpool::~Maxpool ( )
virtualdefault

Member Function Documentation

◆ Backward()

bool tesseract::Maxpool::Backward ( bool  debug,
const NetworkIO fwd_deltas,
NetworkScratch scratch,
NetworkIO back_deltas 
)
overridevirtual

Reimplemented from tesseract::Network.

◆ DeSerialize()

bool tesseract::Maxpool::DeSerialize ( TFile fp)
overridevirtual

Reimplemented from tesseract::Network.

◆ Forward()

void tesseract::Maxpool::Forward ( bool  debug,
const NetworkIO input,
const TransposedArray input_transpose,
NetworkScratch scratch,
NetworkIO output 
)
overridevirtual

Reimplemented from tesseract::Network.

◆ spec()

STRING tesseract::Maxpool::spec ( ) const
inlineoverridevirtual

Reimplemented from tesseract::Network.

Member Data Documentation

◆ maxes_

GENERIC_2D_ARRAY<int> tesseract::Maxpool::maxes_
private

The documentation for this class was generated from the following files: