19 #ifndef TESSERACT_LSTM_REVERSED_H_ 20 #define TESSERACT_LSTM_REVERSED_H_ 47 if (net_spec[0] ==
'L') {
58 for (
int i = 0; i < net_spec.
length(); ++i) {
59 if (net_spec[i] == from) net_spec[i] = to;
89 #endif // TESSERACT_LSTM_REVERSED_H_ void SetNetwork(Network *network)
Definition: reversed.cpp:47
PointerVector< Network > stack_
Definition: plumbing.h:136
bool Backward(bool debug, const NetworkIO &fwd_deltas, NetworkScratch *scratch, NetworkIO *back_deltas) override
Definition: reversed.cpp:66
void Forward(bool debug, const NetworkIO &input, const TransposedArray *input_transpose, NetworkScratch *scratch, NetworkIO *output) override
Definition: reversed.cpp:54
Definition: static_shape.h:38
Definition: plumbing.h:30
Definition: networkscratch.h:36
int32_t length() const
Definition: strngs.cpp:191
Definition: baseapi.cpp:94
const STRING & name() const
Definition: network.h:138
NetworkType
Definition: network.h:43
Definition: weightmatrix.h:33
Definition: network.h:105
NetworkType type() const
Definition: network.h:112
Reversed(const STRING &name, NetworkType type)
Definition: reversed.cpp:27
virtual ~Reversed()=default
Definition: networkio.h:39
NetworkType type_
Definition: network.h:299
void ReverseData(const NetworkIO &src, NetworkIO *dest) const
Definition: reversed.cpp:80
StaticShape OutputShape(const StaticShape &input_shape) const override
Definition: reversed.cpp:33
Definition: reversed.h:28
STRING spec() const override
Definition: reversed.h:37