|
tesseract
5.0.0
|
#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 ([[maybe_unused]] int old_no, [[maybe_unused]] 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 ([[maybe_unused]] int factor) |
| virtual void | DebugWeights ()=0 |
| virtual bool | Serialize (TFile *fp) const |
| virtual bool | DeSerialize (TFile *fp)=0 |
| virtual void | Update ([[maybe_unused]] float learning_rate, [[maybe_unused]] float momentum, [[maybe_unused]] float adam_beta, [[maybe_unused]] int num_samples) |
| virtual void | CountAlternators ([[maybe_unused]] const Network &other, [[maybe_unused]] TFloat *same, [[maybe_unused]] 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 |
|
static |
Definition at line 350 of file network.cpp.
|
inlinevirtual |
Reimplemented in tesseract::Plumbing, tesseract::LSTM, and tesseract::FullyConnected.
Definition at line 217 of file network.cpp.
|
pure virtual |
Implemented in tesseract::Plumbing, tesseract::LSTM, and tesseract::FullyConnected.
|
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::Series, tesseract::Plumbing, tesseract::LSTM, and tesseract::FullyConnected.
Definition at line 137 of file network.cpp.
|
inlinevirtual |
Reimplemented in tesseract::Plumbing, and tesseract::Input.
|
inlinevirtual |
Reimplemented in tesseract::Plumbing.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Reimplemented in tesseract::Series, tesseract::Reversed, tesseract::Reconfig, tesseract::Parallel, tesseract::LSTM, and tesseract::FullyConnected.
Definition at line 324 of file network.cpp.
|
inlinevirtual |
|
virtual |
Reimplemented in tesseract::Reconfig, tesseract::Plumbing, tesseract::LSTM, tesseract::Input, tesseract::FullyConnected, and tesseract::Convolve.
Definition at line 158 of file network.cpp.
|
virtual |
Reimplemented in tesseract::Plumbing, tesseract::LSTM, and tesseract::FullyConnected.
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::Series, and tesseract::Plumbing.
Definition at line 152 of file network.cpp.
|
inlinevirtual |
|
inline |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in tesseract::Series, tesseract::Reconfig, tesseract::Plumbing, and tesseract::Input.
|
protected |
|
protected |
|
protected |
|
protected |