tesseract
5.0.0-alpha-619-ge9db
|
Go to the documentation of this file.
18 #ifndef TESSERACT_LSTM_LSTMRECOGNIZER_H_
19 #define TESSERACT_LSTM_LSTMRECOGNIZER_H_
81 auto* series = static_cast<Series*>(
network_);
83 series->EnumerateLayers(
nullptr, &layers);
90 auto* series = static_cast<Series*>(
network_);
91 return series->GetLayer(&
id[1]);
98 auto* series = static_cast<Series*>(
network_);
99 return series->LayerLearningRate(&
id[1]);
110 for (
int i = 0; i < layers.
size(); ++i) {
119 auto* series = static_cast<Series*>(
network_);
120 series->ScaleLayerLearningRate(&
id[1], factor);
179 double worst_dict_cert,
const TBOX& line_box,
181 int lstm_choice_amount = 5);
185 float* mean_output,
float* sd);
196 bool re_invert,
bool upside_down,
float* scale_factor,
207 const char* window_name,
ScrollView** window);
238 int best_choice,
int x_start,
int x_end);
303 #endif // TESSERACT_LSTM_LSTMRECOGNIZER_H_
LossType loss_type() const
void DebugActivationPath(const NetworkIO &outputs, const GenericVector< int > &labels, const GenericVector< int > &xcoords)
bool IsTensorFlow() const
void LabelsViaSimpleText(const NetworkIO &output, GenericVector< int > *labels, GenericVector< int > *xcoords)
void ScaleLayerLearningRate(const STRING &id, double factor)
RecodeBeamSearch * search_
int training_iteration() const
bool LoadDictionary(const ParamsVectors *params, const char *lang, TessdataManager *mgr)
double learning_rate() const
int32_t sample_iteration_
GenericVector< STRING > EnumerateLayers() const
void DebugActivationRange(const NetworkIO &outputs, const char *label, int best_choice, int x_start, int x_end)
void LabelsFromOutputs(const NetworkIO &outputs, GenericVector< int > *labels, GenericVector< int > *xcoords)
void DisplayForward(const NetworkIO &inputs, const GenericVector< int > &labels, const GenericVector< int > &label_coords, const char *window_name, ScrollView **window)
const UNICHARSET & GetUnicharset() const
bool LoadRecoder(TFile *fp)
bool TestFlag(NetworkFlags flag) const
float GetLayerLearningRate(const STRING &id) const
bool LoadCharsets(const TessdataManager *mgr)
virtual StaticShape OutputShape(const StaticShape &input_shape) const
void SetIteration(int iteration)
bool DeSerialize(const TessdataManager *mgr, TFile *fp)
void RecognizeLine(const ImageData &image_data, bool invert, bool debug, double worst_dict_cert, const TBOX &line_box, PointerVector< WERD_RES > *words, int lstm_choice_mode=0, int lstm_choice_amount=5)
NetworkScratch scratch_space_
const UnicharCompress & GetRecoder() const
virtual void ConvertToInt()
LossType OutputLossType() const
void ScaleLearningRate(double factor)
Network * GetLayer(const STRING &id) const
bool Serialize(const TessdataManager *mgr, TFile *fp) const
int32_t training_iteration_
void OutputStats(const NetworkIO &outputs, float *min_output, float *mean_output, float *sd)
bool SimpleTextOutput() const
void set_seed(uint64_t seed)
void LabelsViaReEncode(const NetworkIO &output, GenericVector< int > *labels, GenericVector< int > *xcoords)
const char * DecodeSingleLabel(int label)
UNICHARSET & GetUnicharset()
const Dict * GetDict() const
void DisplayLSTMOutput(const GenericVector< int > &labels, const GenericVector< int > &xcoords, int height, ScrollView *window)
const char * DecodeLabel(const GenericVector< int > &labels, int start, int *end, int *decoded)
bool Load(const ParamsVectors *params, const char *lang, TessdataManager *mgr)
int sample_iteration() const
STRING DecodeLabels(const GenericVector< int > &labels)