NeuralNet: main container class for network layers.
More...
Inherits Trainable.
|
| NeuralNet (EasyCL *cl, int numPlanes, int imageSize) |
| Constructor.
|
|
publicapi void | addLayer (LayerMaker2 *maker) |
| Add a network layer, using a LayerMaker2 object. More...
|
|
publicapi void | initWeights (int layerIndex, float *weights, float *bias) |
|
publicapi void | initWeights (int layerIndex, float *weights) |
|
publicapi void | initBias (int layerIndex, float *weights) |
|
publicapi float | calcLoss (float const *expectedValues) |
| calculate the loss, based on the passed in expectedValues array More...
|
|
publicapi float | calcLossFromLabels (int const *labels) |
|
publicapi InputLayer * | getFirstLayer () |
|
publicapi Layer * | getLastLayer () |
|
publicapi int | getNumLayers () const |
|
publicapi Layer * | getLayer (int index) |
|
publicapi Layer const * | getLastLayer () const |
|
virtual publicapi int | getOutputPlanes () const |
|
virtual publicapi int | getOutputSize () const |
|
publicapi void | setBatchSize (int batchSize) |
|
publicapi void | setTraining (bool training) |
|
publicapi int | calcNumRight (int const *labels) |
|
publicapi void | forward (float const *images) |
|
publicapi void | backwardFromLabels (int const *labels) |
| note: this does no learning, just calculates the gradients More...
|
|
publicapi void | backward (float const *expectedOutput) |
| note: this does no learning, just calculates the gradients More...
|
|
publicapi int | getNumLayers () |
|
publicapi float const * | getOutput (int layer) const |
|
publicapi int | getInputCubeSize () const |
|
publicapi int | getOutputCubeSize () const |
|
publicapi float const * | getOutput () const |
|
virtual publicapi int | getOutputNumElements () const |
|
publicapi std::string | asString () |
|
publicapi const char * | asNewCharStar () |
|
NeuralNet: main container class for network layers.
- Public API
publicapi void NeuralNet::addLayer |
( |
LayerMaker2 * |
maker | ) |
|
Add a network layer, using a LayerMaker2 object.
- Public API
publicapi void NeuralNet::initWeights |
( |
int |
layerIndex, |
|
|
float * |
weights, |
|
|
float * |
bias |
|
) |
| |
publicapi void NeuralNet::initWeights |
( |
int |
layerIndex, |
|
|
float * |
weights |
|
) |
| |
publicapi void NeuralNet::initBias |
( |
int |
layerIndex, |
|
|
float * |
weights |
|
) |
| |
publicapi float NeuralNet::calcLoss |
( |
float const * |
expectedValues | ) |
|
calculate the loss, based on the passed in expectedValues array
- Public API
- Public API
Calculate the loss, based on the passed in expectedValues array which should be the same size as the output of the final layer of the network
- Public API
publicapi float NeuralNet::calcLossFromLabels |
( |
int const * |
labels | ) |
|
publicapi InputLayer * NeuralNet::getFirstLayer |
( |
| ) |
|
publicapi Layer * NeuralNet::getLastLayer |
( |
| ) |
|
publicapi int NeuralNet::getNumLayers |
( |
| ) |
const |
publicapi Layer * NeuralNet::getLayer |
( |
int |
index | ) |
|
publicapi Layer const * NeuralNet::getLastLayer |
( |
| ) |
const |
publicapi VIRTUAL int NeuralNet::getOutputPlanes |
( |
| ) |
const |
|
virtual |
publicapi VIRTUAL int NeuralNet::getOutputSize |
( |
| ) |
const |
|
virtual |
publicapi void NeuralNet::setBatchSize |
( |
int |
batchSize | ) |
|
publicapi void NeuralNet::setTraining |
( |
bool |
training | ) |
|
publicapi int NeuralNet::calcNumRight |
( |
int const * |
labels | ) |
|
publicapi void NeuralNet::forward |
( |
float const * |
images | ) |
|
publicapi void NeuralNet::backwardFromLabels |
( |
int const * |
labels | ) |
|
note: this does no learning, just calculates the gradients
- Public API
publicapi void NeuralNet::backward |
( |
float const * |
expectedOutput | ) |
|
note: this does no learning, just calculates the gradients
- Public API
publicapi int NeuralNet::getNumLayers |
( |
| ) |
|
publicapi float const * NeuralNet::getOutput |
( |
int |
layer | ) |
const |
publicapi int NeuralNet::getInputCubeSize |
( |
| ) |
const |
publicapi int NeuralNet::getOutputCubeSize |
( |
| ) |
const |
publicapi float const * NeuralNet::getOutput |
( |
| ) |
const |
publicapi VIRTUAL int NeuralNet::getOutputNumElements |
( |
| ) |
const |
|
virtual |
publicapi std::string NeuralNet::asString |
( |
| ) |
|
publicapi const char * NeuralNet::asNewCharStar |
( |
| ) |
|
The documentation for this class was generated from the following files:
- NeuralNet.h
- NeuralNet.cpp