#include <plumbing.h>
Public Member Functions | |
Plumbing (const STRING &name) | |
virtual | ~Plumbing ()=default |
StaticShape | InputShape () const override |
STRING | spec () const override |
bool | IsPlumbingType () const override |
void | SetEnableTraining (TrainingState state) override |
void | SetNetworkFlags (uint32_t flags) override |
int | InitWeights (float range, TRand *randomizer) override |
int | RemapOutputs (int old_no, const std::vector< int > &code_map) override |
void | ConvertToInt () override |
void | SetRandomizer (TRand *randomizer) override |
virtual void | AddToStack (Network *network) |
bool | SetupNeedsBackprop (bool needs_backprop) override |
int | XScaleFactor () const override |
void | CacheXScaleFactor (int factor) override |
void | DebugWeights () override |
const PointerVector< Network > & | stack () const |
void | EnumerateLayers (const STRING *prefix, GenericVector< STRING > *layers) const |
Network * | GetLayer (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 |
virtual StaticShape | OutputShape (const StaticShape &input_shape) const |
const STRING & | name () const |
bool | TestFlag (NetworkFlags flag) const |
virtual void | Forward (bool debug, const NetworkIO &input, const TransposedArray *input_transpose, NetworkScratch *scratch, NetworkIO *output) |
virtual bool | Backward (bool debug, const NetworkIO &fwd_deltas, NetworkScratch *scratch, NetworkIO *back_deltas) |
void | DisplayForward (const NetworkIO &matrix) |
void | DisplayBackward (const NetworkIO &matrix) |
Protected Attributes | |
PointerVector< Network > | stack_ |
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_ |
ScrollView * | forward_win_ |
ScrollView * | backward_win_ |
TRand * | randomizer_ |
Additional Inherited Members | |
Static Public Member Functions inherited from tesseract::Network | |
static Network * | CreateFromFile (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) |
Static Protected Attributes inherited from tesseract::Network | |
static char const *const | kTypeNames [NT_COUNT] |
|
explicit |
|
virtualdefault |
|
virtual |
|
overridevirtual |
Reimplemented from tesseract::Network.
Reimplemented in tesseract::Series.
|
overridevirtual |
Reimplemented from tesseract::Network.
|
overridevirtual |
Reimplemented from tesseract::Network.
|
overridevirtual |
Reimplemented from tesseract::Network.
|
overridevirtual |
Reimplemented from tesseract::Network.
void tesseract::Plumbing::EnumerateLayers | ( | const STRING * | prefix, |
GenericVector< STRING > * | layers | ||
) | const |
Network * tesseract::Plumbing::GetLayer | ( | const char * | id | ) | const |
|
overridevirtual |
Reimplemented from tesseract::Network.
Reimplemented in tesseract::Series.
|
inlineoverridevirtual |
Reimplemented from tesseract::Network.
|
inlineoverridevirtual |
Reimplemented from tesseract::Network.
|
inline |
float * tesseract::Plumbing::LayerLearningRatePtr | ( | const char * | id | ) | const |
|
overridevirtual |
Reimplemented from tesseract::Network.
Reimplemented in tesseract::Series.
|
inline |
|
overridevirtual |
Reimplemented from tesseract::Network.
|
overridevirtual |
Reimplemented from tesseract::Network.
|
overridevirtual |
Reimplemented from tesseract::Network.
|
overridevirtual |
Reimplemented from tesseract::Network.
|
overridevirtual |
Reimplemented from tesseract::Network.
Reimplemented in tesseract::Series.
|
inlineoverridevirtual |
Reimplemented from tesseract::Network.
Reimplemented in tesseract::Reversed, and tesseract::Series.
|
inline |
|
overridevirtual |
Reimplemented from tesseract::Network.
|
overridevirtual |
Reimplemented from tesseract::Network.
Reimplemented in tesseract::Series.
|
protected |
|
protected |