19 #ifndef TESSERACT_LSTM_LSTMRECOGNIZER_H_ 20 #define TESSERACT_LSTM_LSTMRECOGNIZER_H_ 90 series->EnumerateLayers(
nullptr, &layers);
117 for (
int i = 0; i < layers.
size(); ++i) {
186 double worst_dict_cert,
const TBOX& line_box,
191 float* min_output,
float* mean_output,
float* sd);
202 bool re_invert,
bool upside_down,
float* scale_factor,
214 const char* window_name,
246 int best_choice,
int x_start,
int x_end);
312 #endif // TESSERACT_LSTM_LSTMRECOGNIZER_H_
const UNICHARSET & GetUnicharset() const
Network * GetLayer(const STRING &id) const
bool LoadCharsets(const TessdataManager *mgr)
bool LoadDictionary(const char *lang, TessdataManager *mgr)
const char * DecodeSingleLabel(int label)
void ScaleLayerLearningRate(const STRING &id, double factor)
void DebugActivationRange(const NetworkIO &outputs, const char *label, int best_choice, int x_start, int x_end)
STRING DecodeLabels(const GenericVector< int > &labels)
void SetIteration(int iteration)
const UnicharCompress & GetRecoder() const
int training_iteration() const
const char * DecodeLabel(const GenericVector< int > &labels, int start, int *end, int *decoded)
bool SimpleTextOutput() const
void ScaleLearningRate(double factor)
const Dict * GetDict() const
LossType loss_type() const
NetworkScratch scratch_space_
float GetLayerLearningRate(const STRING &id) const
int sample_iteration() const
void DebugActivationPath(const NetworkIO &outputs, const GenericVector< int > &labels, const GenericVector< int > &xcoords)
Network * GetLayer(const char *id) const
void DisplayForward(const NetworkIO &inputs, const GenericVector< int > &labels, const GenericVector< int > &label_coords, const char *window_name, ScrollView **window)
void OutputStats(const NetworkIO &outputs, float *min_output, float *mean_output, float *sd)
bool DeSerialize(const TessdataManager *mgr, TFile *fp)
bool Load(const char *lang, TessdataManager *mgr)
void LabelsViaReEncode(const NetworkIO &output, GenericVector< int > *labels, GenericVector< int > *xcoords)
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)
void DisplayLSTMOutput(const GenericVector< int > &labels, const GenericVector< int > &xcoords, int height, ScrollView *window)
virtual void ConvertToInt()
virtual StaticShape OutputShape(const StaticShape &input_shape) const
void ScaleLayerLearningRate(const char *id, double factor)
LossType OutputLossType() const
float LayerLearningRate(const char *id) const
void LabelsViaSimpleText(const NetworkIO &output, GenericVector< int > *labels, GenericVector< int > *xcoords)
double learning_rate() const
GenericVector< STRING > EnumerateLayers() const
bool LoadRecoder(TFile *fp)
int32_t sample_iteration_
int32_t training_iteration_
bool TestFlag(NetworkFlags flag) const
bool Serialize(const TessdataManager *mgr, TFile *fp) const
void set_seed(uint64_t seed)
RecodeBeamSearch * search_
bool IsTensorFlow() const
void LabelsFromOutputs(const NetworkIO &outputs, GenericVector< int > *labels, GenericVector< int > *xcoords)