|
tesseract v5.3.3.20231005
|
#include <network.h>
Public Member Functions | |
| Network () | |
| Network (NetworkType type, const std::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 |
| virtual StaticShape | OutputShape (const StaticShape &input_shape) const |
| const std::string & | name () const |
| virtual std::string | spec () 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 int | XScaleFactor () const |
| virtual void | CacheXScaleFactor (int factor) |
| virtual void | DebugWeights ()=0 |
| virtual bool | Serialize (TFile *fp) const |
| virtual bool | DeSerialize (TFile *fp)=0 |
| virtual void | Update (float learning_rate, float momentum, float adam_beta, int num_samples) |
| virtual void | CountAlternators (const Network &other, TFloat *same, TFloat *changed) const |
| virtual void | Forward (bool debug, const NetworkIO &input, const TransposedArray *input_transpose, NetworkScratch *scratch, NetworkIO *output)=0 |
| virtual bool | Backward (bool debug, const NetworkIO &fwd_deltas, NetworkScratch *scratch, NetworkIO *back_deltas)=0 |
| void | DisplayForward (const NetworkIO &matrix) |
| void | DisplayBackward (const NetworkIO &matrix) |
Static Public Member Functions | |
| static Network * | CreateFromFile (TFile *fp) |
| static void | ClearWindow (bool tess_coords, const char *window_name, int width, int height, ScrollView **window) |
| static int | DisplayImage (Image pix, ScrollView *window) |
Protected Member Functions | |
| TFloat | Random (TFloat range) |
Protected Attributes | |
| NetworkType | type_ |
| TrainingState | training_ |
| bool | needs_to_backprop_ |
| int32_t | network_flags_ |
| int32_t | ni_ |
| int32_t | no_ |
| int32_t | num_weights_ |
| std::string | name_ |
| ScrollView * | forward_win_ |
| ScrollView * | backward_win_ |
| TRand * | randomizer_ |
| tesseract::Network::Network | ( | ) |
Definition at line 80 of file network.cpp.
| tesseract::Network::Network | ( | NetworkType | type, |
| const std::string & | name, | ||
| int | ni, | ||
| int | no | ||
| ) |
Definition at line 91 of file network.cpp.
|
virtualdefault |
|
pure virtual |
|
inlinevirtual |
Reimplemented in tesseract::Input, tesseract::Plumbing, and tesseract::Series.
Definition at line 220 of file network.h.
|
static |
Definition at line 350 of file network.cpp.
|
inlinevirtual |
Reimplemented in tesseract::FullyConnected, tesseract::LSTM, and tesseract::Plumbing.
Definition at line 196 of file network.h.
|
inlinevirtual |
Reimplemented in tesseract::FullyConnected, tesseract::LSTM, and tesseract::Plumbing.
Definition at line 242 of file network.h.
Definition at line 217 of file network.cpp.
|
pure virtual |
Implemented in tesseract::FullyConnected, tesseract::LSTM, and tesseract::Plumbing.
|
pure virtual |
| void tesseract::Network::DisplayBackward | ( | const NetworkIO & | matrix | ) |
Definition at line 341 of file network.cpp.
| void tesseract::Network::DisplayForward | ( | const NetworkIO & | matrix | ) |
Definition at line 333 of file network.cpp.
|
static |
Definition at line 378 of file network.cpp.
|
pure virtual |
|
virtual |
Reimplemented in tesseract::FullyConnected, tesseract::LSTM, tesseract::Plumbing, and tesseract::Series.
Definition at line 137 of file network.cpp.
|
inlinevirtual |
Reimplemented in tesseract::Input, and tesseract::Plumbing.
Definition at line 129 of file network.h.
|
inlinevirtual |
Reimplemented in tesseract::Plumbing.
Definition at line 154 of file network.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Reimplemented in tesseract::FullyConnected, tesseract::Input, tesseract::LSTM, tesseract::Parallel, tesseract::Reconfig, tesseract::Reversed, and tesseract::Series.
Definition at line 324 of file network.cpp.
|
inlinevirtual |
Reimplemented in tesseract::FullyConnected, tesseract::LSTM, tesseract::Plumbing, and tesseract::Series.
Definition at line 190 of file network.h.
|
virtual |
Reimplemented in tesseract::Convolve, tesseract::FullyConnected, tesseract::Input, tesseract::LSTM, tesseract::Plumbing, and tesseract::Reconfig.
Definition at line 158 of file network.cpp.
|
virtual |
Reimplemented in tesseract::FullyConnected, tesseract::LSTM, and tesseract::Plumbing.
Definition at line 113 of file network.cpp.
|
virtual |
Reimplemented in tesseract::Plumbing.
Definition at line 131 of file network.cpp.
|
virtual |
Reimplemented in tesseract::Plumbing.
Definition at line 145 of file network.cpp.
|
virtual |
Reimplemented in tesseract::Plumbing, and tesseract::Series.
Definition at line 152 of file network.cpp.
|
inlinevirtual |
Reimplemented in tesseract::Convolve, tesseract::FullyConnected, tesseract::Input, tesseract::LSTM, tesseract::Maxpool, tesseract::Parallel, tesseract::Plumbing, tesseract::Reconfig, tesseract::Reversed, and tesseract::Series.
Definition at line 143 of file network.h.
|
inline |
|
inline |
|
inlinevirtual |
Reimplemented in tesseract::FullyConnected, tesseract::LSTM, and tesseract::Plumbing.
Definition at line 235 of file network.h.
|
inlinevirtual |
Reimplemented in tesseract::Input, tesseract::Plumbing, tesseract::Reconfig, and tesseract::Series.
Definition at line 214 of file network.h.
|
protected |
|
protected |
|
protected |
|
protected |