tesseract v5.3.3.20231005
|
#include <weightmatrix.h>
Public Member Functions | |
WeightMatrix () | |
int | InitWeightsFloat (int no, int ni, bool use_adam, float weight_range, TRand *randomizer) |
int | RemapOutputs (const std::vector< int > &code_map) |
void | ConvertToInt () |
int | RoundInputs (int size) const |
bool | is_int_mode () const |
int | NumOutputs () const |
const TFloat * | GetWeights (int index) const |
TFloat | GetDW (int i, int j) const |
void | InitBackward () |
bool | Serialize (bool training, TFile *fp) const |
bool | DeSerialize (bool training, TFile *fp) |
bool | DeSerializeOld (bool training, TFile *fp) |
void | MatrixDotVector (const TFloat *u, TFloat *v) const |
void | MatrixDotVector (const int8_t *u, TFloat *v) const |
void | MultiplyAccumulate (const TFloat *v, TFloat *inout) |
void | VectorDotMatrix (const TFloat *u, TFloat *v) const |
void | SumOuterTransposed (const TransposedArray &u, const TransposedArray &v, bool parallel) |
void | Update (float learning_rate, float momentum, float adam_beta, int num_samples) |
void | AddDeltas (const WeightMatrix &other) |
void | CountAlternators (const WeightMatrix &other, TFloat *same, TFloat *changed) const |
void | Debug2D (const char *msg) |
Definition at line 70 of file weightmatrix.h.
|
inline |
Definition at line 72 of file weightmatrix.h.
void tesseract::WeightMatrix::AddDeltas | ( | const WeightMatrix & | other | ) |
Definition at line 486 of file weightmatrix.cpp.
void tesseract::WeightMatrix::ConvertToInt | ( | ) |
Definition at line 183 of file weightmatrix.cpp.
void tesseract::WeightMatrix::CountAlternators | ( | const WeightMatrix & | other, |
TFloat * | same, | ||
TFloat * | changed | ||
) | const |
Definition at line 495 of file weightmatrix.cpp.
void tesseract::WeightMatrix::Debug2D | ( | const char * | msg | ) |
Definition at line 527 of file weightmatrix.cpp.
bool tesseract::WeightMatrix::DeSerialize | ( | bool | training, |
TFile * | fp | ||
) |
Definition at line 280 of file weightmatrix.cpp.
bool tesseract::WeightMatrix::DeSerializeOld | ( | bool | training, |
TFile * | fp | ||
) |
Definition at line 342 of file weightmatrix.cpp.
|
inline |
Definition at line 115 of file weightmatrix.h.
|
inline |
Definition at line 111 of file weightmatrix.h.
void tesseract::WeightMatrix::InitBackward | ( | ) |
Definition at line 217 of file weightmatrix.cpp.
int tesseract::WeightMatrix::InitWeightsFloat | ( | int | no, |
int | ni, | ||
bool | use_adam, | ||
float | weight_range, | ||
TRand * | randomizer | ||
) |
Definition at line 130 of file weightmatrix.cpp.
|
inline |
Definition at line 104 of file weightmatrix.h.
void tesseract::WeightMatrix::MatrixDotVector | ( | const int8_t * | u, |
TFloat * | v | ||
) | const |
Definition at line 393 of file weightmatrix.cpp.
Definition at line 388 of file weightmatrix.cpp.
|
inline |
Definition at line 107 of file weightmatrix.h.
int tesseract::WeightMatrix::RemapOutputs | ( | const std::vector< int > & | code_map | ) |
Definition at line 151 of file weightmatrix.cpp.
|
inline |
Definition at line 96 of file weightmatrix.h.
bool tesseract::WeightMatrix::Serialize | ( | bool | training, |
TFile * | fp | ||
) | const |
Definition at line 238 of file weightmatrix.cpp.
void tesseract::WeightMatrix::SumOuterTransposed | ( | const TransposedArray & | u, |
const TransposedArray & | v, | ||
bool | parallel | ||
) |
Definition at line 429 of file weightmatrix.cpp.
void tesseract::WeightMatrix::Update | ( | float | learning_rate, |
float | momentum, | ||
float | adam_beta, | ||
int | num_samples | ||
) |
Definition at line 460 of file weightmatrix.cpp.
Definition at line 419 of file weightmatrix.cpp.