GClasses
GClasses::GContextNeuralNet Class Reference

Detailed Description

Contains the buffers that a thread needs to train or use a GNeuralNet. Each thread should use a separate GContextNeuralNet object. Call GNeuralNet::newContext to obtain a new GContextNeuralNet object.

#include <GNeuralNet.h>

Inheritance diagram for GClasses::GContextNeuralNet:
GClasses::GContext

Public Member Functions

 ~GContextNeuralNet ()
 
GVecblameBuf ()
 Returns the blame buffer for the output layer. More...
 
GContextLayerlayer (size_t i)
 
size_t layerCount () const
 
GVecpredBuf ()
 Returns the activation buffer for the output layer. More...
 
virtual void resetState () override
 See the comment for GContext::resetState. More...
 
- Public Member Functions inherited from GClasses::GContext
 GContext (GRand &rand)
 
virtual ~GContext ()
 

Protected Member Functions

 GContextNeuralNet (GRand &rand, const GNeuralNet &nn)
 

Protected Attributes

std::vector< GContextLayer * > m_layers
 
const GNeuralNetm_nn
 
GContextLayerm_pOutputLayer
 

Friends

class GNeuralNet
 

Additional Inherited Members

- Public Attributes inherited from GClasses::GContext
GRandm_rand
 

Constructor & Destructor Documentation

GClasses::GContextNeuralNet::GContextNeuralNet ( GRand rand,
const GNeuralNet nn 
)
protected
GClasses::GContextNeuralNet::~GContextNeuralNet ( )

Member Function Documentation

GVec& GClasses::GContextNeuralNet::blameBuf ( )
inline

Returns the blame buffer for the output layer.

GContextLayer& GClasses::GContextNeuralNet::layer ( size_t  i)
inline
size_t GClasses::GContextNeuralNet::layerCount ( ) const
inline
GVec& GClasses::GContextNeuralNet::predBuf ( )
inline

Returns the activation buffer for the output layer.

virtual void GClasses::GContextNeuralNet::resetState ( )
overridevirtual

See the comment for GContext::resetState.

Implements GClasses::GContext.

Friends And Related Function Documentation

friend class GNeuralNet
friend

Member Data Documentation

std::vector<GContextLayer*> GClasses::GContextNeuralNet::m_layers
protected
const GNeuralNet& GClasses::GContextNeuralNet::m_nn
protected
GContextLayer* GClasses::GContextNeuralNet::m_pOutputLayer
protected