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

#include <series.h>

Inheritance diagram for tesseract::Series:
Collaboration diagram for tesseract::Series:

Public Member Functions

 Series (const STRING &name)
 
virtual ~Series ()=default
 
StaticShape OutputShape (const StaticShape &input_shape) const override
 
STRING spec () const override
 
int InitWeights (float range, TRand *randomizer) override
 
int RemapOutputs (int old_no, const std::vector< int > &code_map) override
 
bool SetupNeedsBackprop (bool needs_backprop) override
 
int XScaleFactor () const override
 
void CacheXScaleFactor (int factor) 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
 
void SplitAt (int last_start, Series **start, Series **end)
 
void AppendSeries (Network *src)
 
- Public Member Functions inherited from tesseract::Plumbing
 Plumbing (const STRING &name)
 
virtual ~Plumbing ()=default
 
StaticShape InputShape () const override
 
bool IsPlumbingType () const override
 
void SetEnableTraining (TrainingState state) override
 
void SetNetworkFlags (uint32_t flags) override
 
void ConvertToInt () override
 
void SetRandomizer (TRand *randomizer) override
 
virtual void AddToStack (Network *network)
 
void DebugWeights () override
 
const PointerVector< Network > & stack () const
 
void EnumerateLayers (const STRING *prefix, GenericVector< STRING > *layers) const
 
NetworkGetLayer (const char *id) const
 
float LayerLearningRate (const char *id) const
 
void ScaleLayerLearningRate (const char *id, double factor)
 
float * LayerLearningRatePtr (const char *id) const
 
bool Serialize (TFile *fp) const override
 
bool DeSerialize (TFile *fp) 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
 
- 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
 
const STRINGname () const
 
bool TestFlag (NetworkFlags flag) const
 
void DisplayForward (const NetworkIO &matrix)
 
void DisplayBackward (const NetworkIO &matrix)
 

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::Plumbing
PointerVector< Networkstack_
 
GenericVector< float > learning_rates_
 
- 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

◆ Series()

tesseract::Series::Series ( const STRING name)
explicit

◆ ~Series()

virtual tesseract::Series::~Series ( )
virtualdefault

Member Function Documentation

◆ AppendSeries()

void tesseract::Series::AppendSeries ( Network src)

◆ Backward()

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

Reimplemented from tesseract::Network.

◆ CacheXScaleFactor()

void tesseract::Series::CacheXScaleFactor ( int  factor)
overridevirtual

Reimplemented from tesseract::Plumbing.

◆ Forward()

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

Reimplemented from tesseract::Network.

◆ InitWeights()

int tesseract::Series::InitWeights ( float  range,
TRand randomizer 
)
overridevirtual

Reimplemented from tesseract::Plumbing.

◆ OutputShape()

StaticShape tesseract::Series::OutputShape ( const StaticShape input_shape) const
overridevirtual

Reimplemented from tesseract::Network.

◆ RemapOutputs()

int tesseract::Series::RemapOutputs ( int  old_no,
const std::vector< int > &  code_map 
)
overridevirtual

Reimplemented from tesseract::Plumbing.

◆ SetupNeedsBackprop()

bool tesseract::Series::SetupNeedsBackprop ( bool  needs_backprop)
overridevirtual

Reimplemented from tesseract::Plumbing.

◆ spec()

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

Reimplemented from tesseract::Plumbing.

◆ SplitAt()

void tesseract::Series::SplitAt ( int  last_start,
Series **  start,
Series **  end 
)

◆ XScaleFactor()

int tesseract::Series::XScaleFactor ( ) const
overridevirtual

Reimplemented from tesseract::Plumbing.


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