tesseract 4.1.1
|
#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 double * | GetWeights (int index) const |
double | 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 double *u, double *v) const |
void | MatrixDotVector (const int8_t *u, double *v) const |
void | MultiplyAccumulate (const double *v, double *inout) |
void | VectorDotMatrix (const double *u, double *v) const |
void | SumOuterTransposed (const TransposedArray &u, const TransposedArray &v, bool parallel) |
void | Update (double learning_rate, double momentum, double adam_beta, int num_samples) |
void | AddDeltas (const WeightMatrix &other) |
void | CountAlternators (const WeightMatrix &other, double *same, double *changed) const |
void | Debug2D (const char *msg) |
Static Public Member Functions | |
static void | FloatToDouble (const GENERIC_2D_ARRAY< float > &wf, GENERIC_2D_ARRAY< double > *wd) |
Definition at line 65 of file weightmatrix.h.
|
inline |
Definition at line 67 of file weightmatrix.h.
void tesseract::WeightMatrix::AddDeltas | ( | const WeightMatrix & | other | ) |
Definition at line 337 of file weightmatrix.cpp.
void tesseract::WeightMatrix::ConvertToInt | ( | ) |
Definition at line 125 of file weightmatrix.cpp.
void tesseract::WeightMatrix::CountAlternators | ( | const WeightMatrix & | other, |
double * | same, | ||
double * | changed | ||
) | const |
Definition at line 346 of file weightmatrix.cpp.
void tesseract::WeightMatrix::Debug2D | ( | const char * | msg | ) |
Definition at line 377 of file weightmatrix.cpp.
bool tesseract::WeightMatrix::DeSerialize | ( | bool | training, |
TFile * | fp | ||
) |
Definition at line 191 of file weightmatrix.cpp.
bool tesseract::WeightMatrix::DeSerializeOld | ( | bool | training, |
TFile * | fp | ||
) |
Definition at line 216 of file weightmatrix.cpp.
|
static |
Definition at line 399 of file weightmatrix.cpp.
|
inline |
Definition at line 105 of file weightmatrix.h.
|
inline |
Definition at line 103 of file weightmatrix.h.
void tesseract::WeightMatrix::InitBackward | ( | ) |
Definition at line 153 of file weightmatrix.cpp.
int tesseract::WeightMatrix::InitWeightsFloat | ( | int | no, |
int | ni, | ||
bool | use_adam, | ||
float | weight_range, | ||
TRand * | randomizer | ||
) |
Definition at line 76 of file weightmatrix.cpp.
|
inline |
Definition at line 98 of file weightmatrix.h.
void tesseract::WeightMatrix::MatrixDotVector | ( | const double * | u, |
double * | v | ||
) | const |
Definition at line 243 of file weightmatrix.cpp.
void tesseract::WeightMatrix::MatrixDotVector | ( | const int8_t * | u, |
double * | v | ||
) | const |
Definition at line 248 of file weightmatrix.cpp.
void tesseract::WeightMatrix::MultiplyAccumulate | ( | const double * | v, |
double * | inout | ||
) |
Definition at line 260 of file weightmatrix.cpp.
|
inline |
Definition at line 101 of file weightmatrix.h.
int tesseract::WeightMatrix::RemapOutputs | ( | const std::vector< int > & | code_map | ) |
Definition at line 97 of file weightmatrix.cpp.
|
inline |
Definition at line 92 of file weightmatrix.h.
bool tesseract::WeightMatrix::Serialize | ( | bool | training, |
TFile * | fp | ||
) | const |
Definition at line 172 of file weightmatrix.cpp.
void tesseract::WeightMatrix::SumOuterTransposed | ( | const TransposedArray & | u, |
const TransposedArray & | v, | ||
bool | parallel | ||
) |
Definition at line 284 of file weightmatrix.cpp.
void tesseract::WeightMatrix::Update | ( | double | learning_rate, |
double | momentum, | ||
double | adam_beta, | ||
int | num_samples | ||
) |
Definition at line 314 of file weightmatrix.cpp.
void tesseract::WeightMatrix::VectorDotMatrix | ( | const double * | u, |
double * | v | ||
) | const |
Definition at line 274 of file weightmatrix.cpp.