DeepCL  SNAPSHOT
Deep convolutional neural networks using OpenCL
Public Member Functions | List of all members
Layer Class Referenceabstract

A single layer within the neural net. More...

Inherited by ActivationLayer, ConvolutionalLayer, DropoutLayer, ForceBackpropLayer, FullyConnectedLayer, InputLayer, LossLayer, NormalizationLayer, PoolingLayer, RandomPatches, and RandomTranslations.

Public Member Functions

virtual publicapi float * getOutput ()=0
 
virtual publicapi int getPersistSize (int version) const =0
 Get the size of array needed for persisting to/from an array. More...
 
virtual publicapi int getOutputNumElements () const =0
 Get the size of the activated output from this layer. More...
 
publicapi Layer (Layer *previousLayer, LayerMaker2 *maker)
 
virtual publicapi void setTraining (bool training)
 Are we training or predicting? Only affects the Random translations and patches layers currently. More...
 
virtual publicapi void setBatchSize (int batchSize)
 used to set up internal buffers and stuff More...
 
virtual publicapi bool getBiased () const
 
virtual publicapi bool hasOutputWrapper () const
 
virtual publicapi CLWrapper * getOutputWrapper ()
 
virtual publicapi int getOutputCubeSize () const
 
virtual publicapi int getOutputPlanes () const
 
virtual publicapi int getOutputSize () const
 
virtual publicapi void backward ()
 
virtual publicapi int getWeightsSize () const
 
virtual publicapi int getBiasSize () const
 
virtual publicapi int getPersistSize () const
 
virtual publicapi void persistToArray (float *array)
 
virtual publicapi void persistToArray (int version, float *array)
 store the current weights and biases to array Note that you need to allocate array first More...
 
virtual publicapi void unpersistFromArray (float const *array)
 
virtual publicapi void unpersistFromArray (int version, float const *array)
 initialize the current weights and biases from array More...
 
virtual std::string asString () const
 Get a string representation of the layer.
 

Detailed Description

A single layer within the neural net.

Public API

Constructor & Destructor Documentation

publicapi Layer::Layer ( Layer previousLayer,
LayerMaker2 *  maker 
)
Public API

Member Function Documentation

virtual publicapi float* Layer::getOutput ( )
pure virtual
Public API
virtual publicapi int Layer::getPersistSize ( int  version) const
pure virtual

Get the size of array needed for persisting to/from an array.

Public API
virtual publicapi int Layer::getOutputNumElements ( ) const
pure virtual

Get the size of the activated output from this layer.

Public API
publicapi VIRTUAL void Layer::setTraining ( bool  training)
virtual

Are we training or predicting? Only affects the Random translations and patches layers currently.

Public API
publicapi VIRTUAL void Layer::setBatchSize ( int  batchSize)
virtual

used to set up internal buffers and stuff

Public API
publicapi VIRTUAL bool Layer::getBiased ( ) const
virtual
Public API
publicapi VIRTUAL bool Layer::hasOutputWrapper ( ) const
virtual
Public API
publicapi VIRTUAL CLWrapper * Layer::getOutputWrapper ( )
virtual
Public API
publicapi VIRTUAL int Layer::getOutputCubeSize ( ) const
virtual
Public API
publicapi VIRTUAL int Layer::getOutputPlanes ( ) const
virtual
Public API
publicapi VIRTUAL int Layer::getOutputSize ( ) const
virtual
Public API
publicapi VIRTUAL void Layer::backward ( )
virtual
Public API
publicapi VIRTUAL int Layer::getWeightsSize ( ) const
virtual
Public API
publicapi VIRTUAL int Layer::getBiasSize ( ) const
virtual
Public API
publicapi VIRTUAL int Layer::getPersistSize ( ) const
virtual
Public API
publicapi VIRTUAL void Layer::persistToArray ( float *  array)
virtual
Public API
publicapi VIRTUAL void Layer::persistToArray ( int  version,
float *  array 
)
virtual

store the current weights and biases to array Note that you need to allocate array first

Public API
publicapi VIRTUAL void Layer::unpersistFromArray ( float const *  array)
virtual
Public API
publicapi VIRTUAL void Layer::unpersistFromArray ( int  version,
float const *  array 
)
virtual

initialize the current weights and biases from array

Public API

The documentation for this class was generated from the following files: