Use to read/write weights from a NeuralNet. More...
Public Member Functions | |
publicapi STATIC int | getTotalNumWeights (NeuralNet *net) |
publicapi STATIC void | copyNetWeightsToArray (NeuralNet *net, float *target) |
publicapi STATIC void | copyArrayToNetWeights (float const *source, NeuralNet *net) |
Use to read/write weights from a NeuralNet.
whilst this class is portable, the weights files created totally are not (ie: endianness) but okish for now... (since it's not like weights files tend to be shared around much, and if they are, then the quickly-written file created by this could be converted by another utility into a portable datafile
Target usage for this class is quickly snapshotting the weights after each epoch. Therefore should be: fast, low IO :-)
publicapi STATIC int WeightsPersister::getTotalNumWeights | ( | NeuralNet * | net | ) |
publicapi STATIC void WeightsPersister::copyNetWeightsToArray | ( | NeuralNet * | net, |
float * | target | ||
) |
publicapi STATIC void WeightsPersister::copyArrayToNetWeights | ( | float const * | source, |
NeuralNet * | net | ||
) |