|
tesseract v5.3.3.20231005
|
#include <fullyconnected.h>
Public Member Functions | |
| TESS_API | FullyConnected (const std::string &name, int ni, int no, NetworkType type) |
| ~FullyConnected () override=default | |
| StaticShape | OutputShape (const StaticShape &input_shape) const override |
| std::string | spec () const override |
| void | ChangeType (NetworkType type) |
| void | SetEnableTraining (TrainingState state) override |
| int | InitWeights (float range, TRand *randomizer) override |
| int | RemapOutputs (int old_no, const std::vector< int > &code_map) override |
| void | ConvertToInt () override |
| void | DebugWeights () 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 |
| void | SetupForward (const NetworkIO &input, const TransposedArray *input_transpose) |
| void | ForwardTimeStep (int t, TFloat *output_line) |
| void | ForwardTimeStep (const TFloat *d_input, int t, TFloat *output_line) |
| void | ForwardTimeStep (const int8_t *i_input, int t, TFloat *output_line) |
| bool | Backward (bool debug, const NetworkIO &fwd_deltas, NetworkScratch *scratch, NetworkIO *back_deltas) override |
| void | BackwardTimeStep (const NetworkIO &fwd_deltas, int t, TFloat *curr_errors, TransposedArray *errors_t, TFloat *backprop) |
| void | FinishBackward (const TransposedArray &errors_t) |
| void | Update (float learning_rate, float momentum, float adam_beta, int num_samples) override |
| void | CountAlternators (const Network &other, TFloat *same, TFloat *changed) const override |
Public Member Functions inherited from tesseract::Network | |
| 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) |
Protected Attributes | |
| WeightMatrix | weights_ |
| TransposedArray | source_t_ |
| const TransposedArray * | external_source_ |
| NetworkIO | acts_ |
| bool | int_mode_ |
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_ |
| std::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 (Image pix, ScrollView *window) |
Protected Member Functions inherited from tesseract::Network | |
| TFloat | Random (TFloat range) |
Definition at line 28 of file fullyconnected.h.
| tesseract::FullyConnected::FullyConnected | ( | const std::string & | name, |
| int | ni, | ||
| int | no, | ||
| NetworkType | type | ||
| ) |
Definition at line 42 of file fullyconnected.cpp.
|
overridedefault |
|
overridevirtual |
Implements tesseract::Network.
Definition at line 238 of file fullyconnected.cpp.
| void tesseract::FullyConnected::BackwardTimeStep | ( | const NetworkIO & | fwd_deltas, |
| int | t, | ||
| TFloat * | curr_errors, | ||
| TransposedArray * | errors_t, | ||
| TFloat * | backprop | ||
| ) |
Definition at line 290 of file fullyconnected.cpp.
|
inline |
Definition at line 62 of file fullyconnected.h.
|
overridevirtual |
Reimplemented from tesseract::Network.
Definition at line 102 of file fullyconnected.cpp.
|
overridevirtual |
Reimplemented from tesseract::Network.
Definition at line 331 of file fullyconnected.cpp.
|
overridevirtual |
|
overridevirtual |
Implements tesseract::Network.
Definition at line 123 of file fullyconnected.cpp.
| void tesseract::FullyConnected::FinishBackward | ( | const TransposedArray & | errors_t | ) |
Definition at line 314 of file fullyconnected.cpp.
|
overridevirtual |
Implements tesseract::Network.
Definition at line 129 of file fullyconnected.cpp.
| void tesseract::FullyConnected::ForwardTimeStep | ( | const int8_t * | i_input, |
| int | t, | ||
| TFloat * | output_line | ||
| ) |
Definition at line 230 of file fullyconnected.cpp.
| void tesseract::FullyConnected::ForwardTimeStep | ( | const TFloat * | d_input, |
| int | t, | ||
| TFloat * | output_line | ||
| ) |
Definition at line 221 of file fullyconnected.cpp.
| void tesseract::FullyConnected::ForwardTimeStep | ( | int | t, |
| TFloat * | output_line | ||
| ) |
|
overridevirtual |
Reimplemented from tesseract::Network.
Definition at line 84 of file fullyconnected.cpp.
|
overridevirtual |
Reimplemented from tesseract::Network.
Definition at line 47 of file fullyconnected.cpp.
|
overridevirtual |
Reimplemented from tesseract::Network.
Definition at line 93 of file fullyconnected.cpp.
|
overridevirtual |
Reimplemented from tesseract::Network.
Definition at line 112 of file fullyconnected.cpp.
|
overridevirtual |
Reimplemented from tesseract::Network.
Definition at line 63 of file fullyconnected.cpp.
| void tesseract::FullyConnected::SetupForward | ( | const NetworkIO & | input, |
| const TransposedArray * | input_transpose | ||
| ) |
Definition at line 190 of file fullyconnected.cpp.
|
inlineoverridevirtual |
Reimplemented from tesseract::Network.
Definition at line 38 of file fullyconnected.h.
|
overridevirtual |
Reimplemented from tesseract::Network.
Definition at line 324 of file fullyconnected.cpp.
|
protected |
Definition at line 124 of file fullyconnected.h.
|
protected |
Definition at line 122 of file fullyconnected.h.
|
protected |
Definition at line 127 of file fullyconnected.h.
|
protected |
Definition at line 119 of file fullyconnected.h.
|
protected |
Definition at line 117 of file fullyconnected.h.