#include <reconfig.h>
|
| Reconfig (const STRING &name, int ni, int x_scale, int y_scale) |
|
| ~Reconfig () override=default |
|
StaticShape | OutputShape (const StaticShape &input_shape) const override |
|
STRING | spec () const override |
|
int | XScaleFactor () const 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 |
|
bool | Backward (bool debug, const NetworkIO &fwd_deltas, NetworkScratch *scratch, NetworkIO *back_deltas) override |
|
| 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 | InputShape () const |
|
const STRING & | name () 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 void | CacheXScaleFactor (int factor) |
|
virtual void | Update (float learning_rate, float momentum, float adam_beta, int num_samples) |
|
virtual void | CountAlternators (const Network &other, double *same, double *changed) const |
|
void | DisplayForward (const NetworkIO &matrix) |
|
void | DisplayBackward (const NetworkIO &matrix) |
|
Definition at line 32 of file reconfig.h.
◆ Reconfig()
tesseract::Reconfig::Reconfig |
( |
const STRING & |
name, |
|
|
int |
ni, |
|
|
int |
x_scale, |
|
|
int |
y_scale |
|
) |
| |
◆ ~Reconfig()
tesseract::Reconfig::~Reconfig |
( |
| ) |
|
|
overridedefault |
◆ Backward()
Implements tesseract::Network.
Definition at line 92 of file reconfig.cpp.
95 back_deltas->ResizeToMap(fwd_deltas.int_mode(),
back_map_,
ni_);
96 StrideMap::Index src_index(fwd_deltas.stride_map());
98 int in_t = src_index.t();
99 StrideMap::Index dest_index(back_deltas->stride_map(),
104 for (
int x = 0; x <
x_scale_; ++x) {
105 for (
int y = 0; y <
y_scale_; ++y) {
106 StrideMap::Index dest_xy(dest_index);
108 back_deltas->CopyTimeStepGeneral(dest_xy.t(), 0,
ni_, fwd_deltas,
113 }
while (src_index.Increment());
◆ DeSerialize()
bool tesseract::Reconfig::DeSerialize |
( |
TFile * |
fp | ) |
|
|
overridevirtual |
◆ Forward()
Implements tesseract::Network.
Definition at line 66 of file reconfig.cpp.
71 StrideMap::Index dest_index(output->stride_map());
73 int out_t = dest_index.t();
74 StrideMap::Index src_index(input.stride_map(), dest_index.index(
FD_BATCH),
80 StrideMap::Index src_xy(src_index);
83 input, src_xy.t(), 0);
87 }
while (dest_index.Increment());
◆ OutputShape()
◆ Serialize()
bool tesseract::Reconfig::Serialize |
( |
TFile * |
fp | ) |
const |
|
overridevirtual |
◆ spec()
STRING tesseract::Reconfig::spec |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ XScaleFactor()
int tesseract::Reconfig::XScaleFactor |
( |
| ) |
const |
|
overridevirtual |
◆ back_map_
◆ x_scale_
int32_t tesseract::Reconfig::x_scale_ |
|
protected |
◆ y_scale_
int32_t tesseract::Reconfig::y_scale_ |
|
protected |
The documentation for this class was generated from the following files: