MachineIntelligenceCore:NeuralNets
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
mic::mlnn::Layer< eT > Class Template Referenceabstract

#include <Layer.hpp>

Inheritance diagram for mic::mlnn::Layer< eT >:
Collaboration diagram for mic::mlnn::Layer< eT >:

Public Member Functions

 Layer (size_t input_height_, size_t input_width_, size_t input_depth_, size_t output_height_, size_t output_width_, size_t output_depth_, LayerTypes layer_type_, std::string name_="layer")
 
virtual ~Layer ()
 
virtual void forward (bool test=false)=0
 
mic::types::MatrixPtr< eT > forward (mic::types::MatrixPtr< eT > x_, bool test=false)
 
virtual void backward ()=0
 
mic::types::MatrixPtr< eT > backward (mic::types::MatrixPtr< eT > dy_)
 
virtual void resizeBatch (size_t batch_size_)
 
template<typename loss >
mic::types::MatrixPtr< eT > calculateNumericalGradient (mic::types::MatrixPtr< eT > x_, mic::types::MatrixPtr< eT > target_y_, mic::types::MatrixPtr< eT > param_, loss loss_, eT delta_)
 
virtual void resetGrads ()
 
virtual void update (eT alpha_, eT decay_=0.0f)=0
 
size_t inputSize ()
 Returns size (length) of inputs. More...
 
size_t outputSize ()
 Returns size (length) of outputs. More...
 
size_t batchSize ()
 Returns size (length) of (mini)batch. More...
 
const std::string name () const
 Returns name of the layer. More...
 
mic::types::MatrixPtr< eT > getParam (std::string name_)
 
mic::types::MatrixPtr< eT > getState (std::string name_)
 
mic::types::MatrixPtr< eT > getGradient (std::string name_)
 
void setState (std::string name_, mic::types::MatrixPtr< eT > mat_ptr_)
 
template<typename omT >
void setOptimization ()
 
const std::string type () const
 
virtual std::string streamLayerParameters ()
 
mic::types::MatrixPtr< eT > lazyReturnSampleFromBatch (mic::types::MatrixPtr< eT > batch_ptr_, mic::types::MatrixArray< eT > &array_, std::string id_, size_t sample_number_, size_t sample_size_)
 
mic::types::MatrixPtr< eT > lazyReturnInputSample (mic::types::MatrixPtr< eT > batch_ptr_, size_t sample_number_)
 
mic::types::MatrixPtr< eT > lazyReturnOutputSample (mic::types::MatrixPtr< eT > batch_ptr_, size_t sample_number_)
 
mic::types::MatrixPtr< eT > lazyReturnChannelFromSample (mic::types::MatrixPtr< eT > sample_ptr_, mic::types::MatrixArray< eT > &array_, std::string id_, size_t sample_number_, size_t channel_number_, size_t height_, size_t width_)
 
mic::types::MatrixPtr< eT > lazyReturnInputChannel (mic::types::MatrixPtr< eT > sample_ptr_, size_t sample_number_, size_t channel_number_)
 
mic::types::MatrixPtr< eT > lazyReturnOutputChannel (mic::types::MatrixPtr< eT > sample_ptr_, size_t sample_number_, size_t channel_number_)
 
void lazyAllocateMatrixVector (std::vector< std::shared_ptr< mic::types::Matrix< eT > > > &vector_, size_t vector_size_, size_t matrix_height_, size_t matrix_width_)
 
virtual std::vector
< std::shared_ptr
< mic::types::Matrix< eT > > > & 
getInputActivations ()
 
virtual std::vector
< std::shared_ptr
< mic::types::Matrix< eT > > > & 
getInputGradientActivations ()
 
virtual std::vector
< std::shared_ptr
< mic::types::Matrix< eT > > > & 
getOutputActivations ()
 
virtual std::vector
< std::shared_ptr
< mic::types::Matrix< eT > > > & 
getOutputGradientActivations ()
 

Protected Member Functions

 Layer ()
 

Protected Attributes

size_t input_height
 Height of the input (e.g. 28 for MNIST). More...
 
size_t input_width
 Width of the input (e.g. 28 for MNIST). More...
 
size_t input_depth
 Number of channels of the input (e.g. 3 for RGB images). More...
 
size_t output_height
 Number of receptive fields in a single channel - vertical direction. More...
 
size_t output_width
 Number of receptive fields in a single channel - horizontal direction. More...
 
size_t output_depth
 Number of filters = number of output channels. More...
 
size_t batch_size
 Size (length) of (mini)batch. More...
 
LayerTypes layer_type
 Type of the layer. More...
 
std::string layer_name
 Name (identifier of the type) of the layer. More...
 
mic::types::MatrixArray< eT > s
 States - contains input [x] and output [y] matrices. More...
 
mic::types::MatrixArray< eT > g
 Gradients - contains input [x] and output [y] matrices. More...
 
mic::types::MatrixArray< eT > p
 Parameters - parameters of the layer, to be used by the derived classes. More...
 
mic::types::MatrixArray< eT > m
 Memory - a list of temporal parameters, to be used by the derived classes. More...
 
mic::neural_nets::optimization::OptimizationArray
< eT > 
opt
 Array of optimization functions. More...
 
std::vector< std::shared_ptr
< mic::types::Matrix< eT > > > 
x_activations
 Vector containing activations of input neurons - used in visualization. More...
 
std::vector< std::shared_ptr
< mic::types::Matrix< eT > > > 
dx_activations
 Vector containing activations of gradients of inputs (dx) - used in visualization. More...
 
std::vector< std::shared_ptr
< mic::types::Matrix< eT > > > 
y_activations
 Vector containing activations of output neurons - used in visualization. More...
 
std::vector< std::shared_ptr
< mic::types::Matrix< eT > > > 
dy_activations
 Vector containing activations of gradients of outputs (dy) - used in visualization. More...
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Friends

template<typename tmp >
class MultiLayerNeuralNetwork
 
template<typename tmp >
class BackpropagationNeuralNetwork
 
template<typename tmp >
class HebbianNeuralNetwork
 
class boost::serialization::access
 
std::ostream & operator<< (std::ostream &os_, Layer &obj_)
 

Detailed Description

template<typename eT = float>
class mic::mlnn::Layer< eT >

Template base (abstract) class representing a layer.

Author
tkornuta/krocki
Template Parameters
eTTemplate parameter denoting precision of variables (float for calculations/double for testing).

Definition at line 94 of file Layer.hpp.

Constructor & Destructor Documentation

template<typename eT = float>
mic::mlnn::Layer< eT >::Layer ( size_t  input_height_,
size_t  input_width_,
size_t  input_depth_,
size_t  output_height_,
size_t  output_width_,
size_t  output_depth_,
LayerTypes  layer_type_,
std::string  name_ = "layer" 
)
inline

Default constructor of the layer parent class. Sets the input-output dimensions, layer type and name.

Parameters
input_height_Height of the input sample.
input_width_Width of the input sample.
input_depth_Depth of the input sample.
output_height_Width of the output sample.
output_width_Height of the output sample.
output_depth_Depth of the output sample.
layer_type_Type of the layer.
name_Name of the layer.

Definition at line 107 of file Layer.hpp.

template<typename eT = float>
virtual mic::mlnn::Layer< eT >::~Layer ( )
inlinevirtual

Virtual destructor - required for the correct destruction of objects of derived classes.

Definition at line 154 of file Layer.hpp.

template<typename eT = float>
mic::mlnn::Layer< eT >::Layer ( )
inlineprotected

Protected constructor, used only by the derived classes during the serialization. Empty!!

Definition at line 783 of file Layer.hpp.

Member Function Documentation

template<typename eT = float>
mic::types::MatrixPtr<eT> mic::mlnn::Layer< eT >::backward ( mic::types::MatrixPtr< eT >  dy_)
inline

Backward pass - backpropagation.

Definition at line 184 of file Layer.hpp.

template<typename eT = float>
size_t mic::mlnn::Layer< eT >::batchSize ( )
inline

Returns size (length) of (mini)batch.

Definition at line 265 of file Layer.hpp.

template<typename eT = float>
template<typename loss >
mic::types::MatrixPtr<eT> mic::mlnn::Layer< eT >::calculateNumericalGradient ( mic::types::MatrixPtr< eT >  x_,
mic::types::MatrixPtr< eT >  target_y_,
mic::types::MatrixPtr< eT >  param_,
loss  loss_,
eT  delta_ 
)
inline

Calculates the numerical gradient.

Parameters
x_Input vector.
target_y_Target (desired) output.
loss_Loss function.
delta_Delta.
Template Parameters
lossLoss function type.

Definition at line 219 of file Layer.hpp.

template<typename eT = float>
mic::types::MatrixPtr<eT> mic::mlnn::Layer< eT >::forward ( mic::types::MatrixPtr< eT >  x_,
bool  test = false 
)
inline

Forwards the activations of the neural network.

Definition at line 165 of file Layer.hpp.

template<typename eT = float>
mic::types::MatrixPtr<eT> mic::mlnn::Layer< eT >::getGradient ( std::string  name_)
inline

Returns the pointer to gradient (matrix) (or throws an exception!)

Definition at line 291 of file Layer.hpp.

template<typename eT = float>
virtual std::vector< std::shared_ptr <mic::types::Matrix<eT> > >& mic::mlnn::Layer< eT >::getInputActivations ( )
inlinevirtual

Normalizes the matrix. to the range <-1.0, 1.0>, e.g. for the visualization purposes. DEPRICATED - functionality moved to mi-visualization!

Parameters
matrix_Matrix to be normalized.

Returns activations of input neurons.

Definition at line 586 of file Layer.hpp.

template<typename eT = float>
virtual std::vector< std::shared_ptr <mic::types::Matrix<eT> > >& mic::mlnn::Layer< eT >::getInputGradientActivations ( )
inlinevirtual

Returns activations of input gradients (dx).

Definition at line 621 of file Layer.hpp.

template<typename eT = float>
virtual std::vector< std::shared_ptr <mic::types::Matrix<eT> > >& mic::mlnn::Layer< eT >::getOutputActivations ( )
inlinevirtual

Returns activations of output neurons.

Reimplemented in mic::mlnn::experimental::ConvHebbian< eT >.

Definition at line 656 of file Layer.hpp.

template<typename eT = float>
virtual std::vector< std::shared_ptr <mic::types::Matrix<eT> > >& mic::mlnn::Layer< eT >::getOutputGradientActivations ( )
inlinevirtual

Returns activations of gradients of output neurons.

Definition at line 691 of file Layer.hpp.

template<typename eT = float>
mic::types::MatrixPtr<eT> mic::mlnn::Layer< eT >::getParam ( std::string  name_)
inline

Returns the pointer to a parameter (matrix) (or throws an exception!)

Definition at line 277 of file Layer.hpp.

template<typename eT = float>
mic::types::MatrixPtr<eT> mic::mlnn::Layer< eT >::getState ( std::string  name_)
inline

Returns the pointer to state (matrix) (or throws an exception!)

Definition at line 284 of file Layer.hpp.

template<typename eT = float>
void mic::mlnn::Layer< eT >::lazyAllocateMatrixVector ( std::vector< std::shared_ptr< mic::types::Matrix< eT > > > &  vector_,
size_t  vector_size_,
size_t  matrix_height_,
size_t  matrix_width_ 
)
inline
template<typename eT = float>
mic::types::MatrixPtr<eT> mic::mlnn::Layer< eT >::lazyReturnChannelFromSample ( mic::types::MatrixPtr< eT >  sample_ptr_,
mic::types::MatrixArray< eT > &  array_,
std::string  id_,
size_t  sample_number_,
size_t  channel_number_,
size_t  height_,
size_t  width_ 
)
inline

Returns channel from a sample. If a given memory array does not contain such a memory pointer - it (lazy) allocates it. Assumes that: a) a sample is a column vector and b) there is one "channel memory ptr" for each sample (so the whole batch can be processed in parallel). OMP secured - critical section inside.

Parameters
sample_ptrPointer to a sample.
array_Array of matrices where a given matrix (channel) is/will be stored.
id_Channel id (variable prefix).
sample_number_Number of the sample in batch.
channel_number_Number of the channel.
height_Height of the channel.
width_Width of the channel.

Definition at line 487 of file Layer.hpp.

Referenced by mic::mlnn::Layer< float >::lazyReturnInputChannel(), and mic::mlnn::Layer< float >::lazyReturnOutputChannel().

template<typename eT = float>
mic::types::MatrixPtr<eT> mic::mlnn::Layer< eT >::lazyReturnInputChannel ( mic::types::MatrixPtr< eT >  sample_ptr_,
size_t  sample_number_,
size_t  channel_number_ 
)
inline

Returns input channel, with lazy matrix ptr allocation.

Parameters
batch_ptr_Pointer to a batch.
sample_number_Number of the sample in batch.
channel_number_Number of the channel in sample.

Definition at line 519 of file Layer.hpp.

Referenced by mic::mlnn::convolution::MaxPooling< eT >::forward().

template<typename eT = float>
mic::types::MatrixPtr<eT> mic::mlnn::Layer< eT >::lazyReturnInputSample ( mic::types::MatrixPtr< eT >  batch_ptr_,
size_t  sample_number_ 
)
inline

Returns input sample, with lazy matrix ptr allocation.

Parameters
batch_ptr_Pointer to a batch.
sample_number_Number of the sample in batch.

Definition at line 460 of file Layer.hpp.

Referenced by mic::mlnn::convolution::MaxPooling< eT >::forward().

template<typename eT = float>
mic::types::MatrixPtr<eT> mic::mlnn::Layer< eT >::lazyReturnOutputChannel ( mic::types::MatrixPtr< eT >  sample_ptr_,
size_t  sample_number_,
size_t  channel_number_ 
)
inline

Returns output sample, with lazy matrix ptr allocation.

Parameters
batch_ptr_Pointer to a batch.
sample_number_Number of the sample in batch.
channel_number_Number of the channel in sample.

Definition at line 530 of file Layer.hpp.

template<typename eT = float>
mic::types::MatrixPtr<eT> mic::mlnn::Layer< eT >::lazyReturnOutputSample ( mic::types::MatrixPtr< eT >  batch_ptr_,
size_t  sample_number_ 
)
inline

Returns output sample, with lazy matrix ptr allocation.

Parameters
batch_ptr_Pointer to a batch.
sample_number_Number of the sample in batch.

Definition at line 470 of file Layer.hpp.

template<typename eT = float>
mic::types::MatrixPtr<eT> mic::mlnn::Layer< eT >::lazyReturnSampleFromBatch ( mic::types::MatrixPtr< eT >  batch_ptr_,
mic::types::MatrixArray< eT > &  array_,
std::string  id_,
size_t  sample_number_,
size_t  sample_size_ 
)
inline

Returns sample from batch. If a given memory array does not contain such a memory pointer - it (lazy) allocates it. OMP secured - critical section inside.

Parameters
batch_ptr_Pointer to a batch.
array_Array of matrices where a given matrix (sample) is/will be stored.
id_Sample id (variable prefix).
sample_number_Number of the sample in batch.
sample_size_Size of the sample.

Definition at line 433 of file Layer.hpp.

Referenced by mic::mlnn::Layer< float >::lazyReturnInputSample(), and mic::mlnn::Layer< float >::lazyReturnOutputSample().

template<typename eT = float>
const std::string mic::mlnn::Layer< eT >::name ( ) const
inline

Returns name of the layer.

Definition at line 270 of file Layer.hpp.

template<typename eT = float>
virtual void mic::mlnn::Layer< eT >::resetGrads ( )
inlinevirtual
template<typename eT = float>
virtual void mic::mlnn::Layer< eT >::resizeBatch ( size_t  batch_size_)
inlinevirtual
template<typename eT = float>
template<class Archive >
void mic::mlnn::Layer< eT >::serialize ( Archive &  ar,
const unsigned int  version 
)
inlineprivate

Serializes the layer to and from archive.

Parameters
arUsed archive.
versionVersion of the layer class (not used currently).

Definition at line 800 of file Layer.hpp.

template<typename eT = float>
template<typename omT >
void mic::mlnn::Layer< eT >::setOptimization ( )
inline

Sets the optimization method.

Template Parameters
omTOptimization method type

Definition at line 307 of file Layer.hpp.

template<typename eT = float>
void mic::mlnn::Layer< eT >::setState ( std::string  name_,
mic::types::MatrixPtr< eT >  mat_ptr_ 
)
inline

Sets state (matrix) (or throws an exception!)

Definition at line 298 of file Layer.hpp.

template<typename eT = float>
virtual std::string mic::mlnn::Layer< eT >::streamLayerParameters ( )
inlinevirtual

Stream layer parameters.

Returns
Ostream object.

Reimplemented in mic::mlnn::convolution::Convolution< eT >, mic::mlnn::convolution::Convolution< double >, and mic::mlnn::convolution::Convolution< float >.

Definition at line 363 of file Layer.hpp.

template<typename eT = float>
const std::string mic::mlnn::Layer< eT >::type ( ) const
inline

Friends And Related Function Documentation

template<typename eT = float>
template<typename tmp >
friend class BackpropagationNeuralNetwork
friend

Definition at line 788 of file Layer.hpp.

template<typename eT = float>
friend class boost::serialization::access
friend

Definition at line 792 of file Layer.hpp.

template<typename eT = float>
template<typename tmp >
friend class HebbianNeuralNetwork
friend

Definition at line 789 of file Layer.hpp.

template<typename eT = float>
template<typename tmp >
friend class MultiLayerNeuralNetwork
friend

Definition at line 787 of file Layer.hpp.

template<typename eT = float>
std::ostream& operator<< ( std::ostream &  os_,
Layer< eT > &  obj_ 
)
friend

Stream operator enabling to print neural network.

Parameters
os_Ostream object.
obj_Tensor object.

Definition at line 385 of file Layer.hpp.

Member Data Documentation

template<typename eT = float>
std::vector< std::shared_ptr <mic::types::Matrix<eT> > > mic::mlnn::Layer< eT >::dx_activations
protected

Vector containing activations of gradients of inputs (dx) - used in visualization.

Definition at line 771 of file Layer.hpp.

Referenced by mic::mlnn::Layer< float >::getInputGradientActivations().

template<typename eT = float>
std::vector< std::shared_ptr <mic::types::Matrix<eT> > > mic::mlnn::Layer< eT >::dy_activations
protected

Vector containing activations of gradients of outputs (dy) - used in visualization.

Definition at line 777 of file Layer.hpp.

Referenced by mic::mlnn::Layer< float >::getOutputGradientActivations().

template<typename eT = float>
mic::types::MatrixArray<eT> mic::mlnn::Layer< eT >::g
protected

Gradients - contains input [x] and output [y] matrices.

Definition at line 756 of file Layer.hpp.

Referenced by mic::mlnn::convolution::Convolution< float >::backpropagade_dy_to_db(), mic::mlnn::convolution::Convolution< float >::backpropagade_dy_to_dW(), mic::mlnn::convolution::Convolution< float >::backpropagade_dy_to_dx(), mic::mlnn::fully_connected::SparseLinear< eT >::backward(), mic::mlnn::activation_function::Sigmoid< eT >::backward(), mic::mlnn::activation_function::ELU< eT >::backward(), mic::mlnn::activation_function::ReLU< eT >::backward(), mic::mlnn::regularisation::Dropout< eT >::backward(), mic::mlnn::convolution::Cropping< eT >::backward(), mic::mlnn::convolution::Padding< eT >::backward(), mic::mlnn::cost_function::Softmax< float >::backward(), mic::mlnn::fully_connected::Linear< float >::backward(), mic::mlnn::convolution::MaxPooling< eT >::backward(), mic::mlnn::Layer< float >::backward(), mic::mlnn::convolution::Convolution< float >::backward(), mic::mlnn::convolution::Convolution< float >::Convolution(), mic::mlnn::Layer< float >::getGradient(), mic::mlnn::Layer< float >::getInputGradientActivations(), mic::mlnn::Layer< float >::getOutputGradientActivations(), mic::mlnn::fully_connected::Linear< float >::getWeightGradientActivations(), mic::mlnn::convolution::Convolution< float >::getWeightGradientActivations(), mic::mlnn::Layer< float >::Layer(), mic::mlnn::fully_connected::Linear< float >::resetGrads(), mic::mlnn::convolution::Convolution< float >::resetGrads(), mic::mlnn::Layer< float >::resizeBatch(), mic::mlnn::Layer< float >::serialize(), mic::neural_nets::unit_tests::Linear2x3Float::SetUp(), mic::neural_nets::unit_tests::Linear2x3Double::SetUp(), mic::neural_nets::unit_tests::Linear50x100Double::SetUp(), mic::mlnn::fully_connected::SparseLinear< eT >::update(), mic::mlnn::fully_connected::Linear< float >::update(), and mic::mlnn::convolution::Convolution< float >::update().

template<typename eT = float>
size_t mic::mlnn::Layer< eT >::input_depth
protected
template<typename eT = float>
std::string mic::mlnn::Layer< eT >::layer_name
protected

Name (identifier of the type) of the layer.

Definition at line 750 of file Layer.hpp.

Referenced by mic::mlnn::Layer< float >::name(), mic::mlnn::Layer< float >::serialize(), and mic::mlnn::Layer< float >::streamLayerParameters().

template<typename eT = float>
LayerTypes mic::mlnn::Layer< eT >::layer_type
protected

Type of the layer.

Definition at line 747 of file Layer.hpp.

Referenced by mic::mlnn::Layer< float >::serialize(), and mic::mlnn::Layer< float >::type().

template<typename eT = float>
mic::types::MatrixArray<eT> mic::mlnn::Layer< eT >::m
protected

Memory - a list of temporal parameters, to be used by the derived classes.

Definition at line 762 of file Layer.hpp.

Referenced by mic::mlnn::convolution::Convolution< float >::backpropagade_dy_to_dW(), mic::mlnn::convolution::Convolution< float >::backpropagade_dy_to_dx(), mic::mlnn::fully_connected::SparseLinear< eT >::backward(), mic::mlnn::regularisation::Dropout< eT >::backward(), mic::mlnn::convolution::MaxPooling< eT >::backward(), mic::mlnn::fully_connected::BinaryCorrelator< eT >::BinaryCorrelator(), mic::mlnn::fully_connected::Linear< float >::calculateMeanReconstructionError(), mic::mlnn::Layer< float >::calculateNumericalGradient(), mic::mlnn::convolution::Convolution< float >::Convolution(), mic::mlnn::regularisation::Dropout< eT >::Dropout(), mic::mlnn::regularisation::Dropout< eT >::forward(), mic::mlnn::convolution::MaxPooling< eT >::forward(), mic::mlnn::cost_function::Softmax< float >::forward(), mic::mlnn::fully_connected::BinaryCorrelator< eT >::forward(), mic::mlnn::convolution::Convolution< float >::forward(), mic::mlnn::convolution::Convolution< float >::getFilterSimilarityMatrix(), mic::mlnn::Layer< float >::getInputActivations(), mic::mlnn::Layer< float >::getInputGradientActivations(), mic::mlnn::fully_connected::Linear< float >::getInverseOutputActivations(), mic::mlnn::convolution::Convolution< float >::getInverseReceptiveFields(), mic::mlnn::Layer< float >::getOutputActivations(), mic::mlnn::Layer< float >::getOutputGradientActivations(), mic::mlnn::convolution::Convolution< float >::getReceptiveFields(), mic::mlnn::Layer< float >::Layer(), mic::mlnn::Layer< float >::lazyAllocateMatrixVector(), mic::mlnn::Layer< float >::lazyReturnChannelFromSample(), mic::mlnn::Layer< float >::lazyReturnInputChannel(), mic::mlnn::Layer< float >::lazyReturnInputSample(), mic::mlnn::Layer< float >::lazyReturnOutputChannel(), mic::mlnn::Layer< float >::lazyReturnOutputSample(), mic::mlnn::Layer< float >::lazyReturnSampleFromBatch(), mic::mlnn::convolution::MaxPooling< eT >::MaxPooling(), mic::mlnn::regularisation::Dropout< eT >::resizeBatch(), mic::mlnn::convolution::MaxPooling< eT >::resizeBatch(), mic::mlnn::cost_function::Softmax< float >::resizeBatch(), mic::mlnn::Layer< float >::serialize(), mic::mlnn::cost_function::Softmax< float >::Softmax(), mic::mlnn::fully_connected::SparseLinear< eT >::SparseLinear(), mic::mlnn::fully_connected::SparseLinear< eT >::update(), and mic::mlnn::fully_connected::BinaryCorrelator< eT >::update().

template<typename eT = float>
size_t mic::mlnn::Layer< eT >::output_height
protected
template<typename eT = float>
size_t mic::mlnn::Layer< eT >::output_width
protected
template<typename eT = float>
mic::types::MatrixArray<eT> mic::mlnn::Layer< eT >::p
protected

Parameters - parameters of the layer, to be used by the derived classes.

Definition at line 759 of file Layer.hpp.

Referenced by mic::mlnn::convolution::Convolution< float >::backpropagade_dy_to_dx(), mic::mlnn::fully_connected::SparseLinear< eT >::backward(), mic::mlnn::fully_connected::Linear< float >::backward(), mic::mlnn::fully_connected::BinaryCorrelator< eT >::BinaryCorrelator(), mic::mlnn::Layer< float >::calculateNumericalGradient(), mic::mlnn::experimental::ConvHebbian< eT >::ConvHebbian(), mic::mlnn::convolution::Convolution< float >::Convolution(), mic::mlnn::experimental::ConvHebbian< eT >::forward(), mic::mlnn::fully_connected::HebbianLinear< eT >::forward(), mic::mlnn::fully_connected::Linear< float >::forward(), mic::mlnn::convolution::Convolution< float >::forward(), mic::mlnn::fully_connected::HebbianLinear< eT >::getActivations(), mic::mlnn::fully_connected::BinaryCorrelator< eT >::getActivations(), mic::mlnn::convolution::Convolution< float >::getFilterSimilarityMatrix(), mic::mlnn::fully_connected::Linear< float >::getInverseOutputActivations(), mic::mlnn::fully_connected::Linear< float >::getInverseWeightActivations(), mic::mlnn::experimental::ConvHebbian< eT >::getOutputReconstruction(), mic::mlnn::Layer< float >::getParam(), mic::mlnn::fully_connected::Linear< float >::getWeightActivations(), mic::mlnn::experimental::ConvHebbian< eT >::getWeightActivations(), mic::mlnn::convolution::Convolution< float >::getWeightActivations(), mic::mlnn::experimental::ConvHebbian< eT >::getWeightDissimilarity(), mic::mlnn::experimental::ConvHebbian< eT >::getWeightSimilarity(), mic::mlnn::fully_connected::HebbianLinear< eT >::HebbianLinear(), mic::mlnn::fully_connected::Linear< float >::Linear(), mic::mlnn::Layer< float >::serialize(), mic::mlnn::Layer< float >::setOptimization(), mic::neural_nets::unit_tests::Linear1x1Float::SetUp(), mic::neural_nets::unit_tests::Conv2x2x2Filter2x1x1s1Double::SetUp(), mic::neural_nets::unit_tests::Linear2x3Float::SetUp(), mic::neural_nets::unit_tests::Conv3x3x2Filter3x2x2s1Float::SetUp(), mic::neural_nets::unit_tests::Linear2x3Double::SetUp(), mic::neural_nets::unit_tests::Linear50x100Double::SetUp(), mic::neural_nets::unit_tests::Conv4x4x1Filter1x2x2s2Float::SetUp(), mic::neural_nets::unit_tests::Conv4x4x1Filter3x1x1s3Double::SetUp(), mic::neural_nets::unit_tests::Conv5x5x1Filter1x3x3s1Float::SetUp(), mic::neural_nets::unit_tests::Conv5x5x1Filter1x2x2s3Float::SetUp(), mic::neural_nets::unit_tests::Conv7x7x3Filter3x3x3s2Float::SetUp(), mic::neural_nets::unit_tests::Conv5x6x1Filter1x4x4s1Float::SetUp(), mic::neural_nets::unit_tests::TEST(), mic::mlnn::fully_connected::SparseLinear< eT >::update(), mic::mlnn::experimental::ConvHebbian< eT >::update(), mic::mlnn::fully_connected::HebbianLinear< eT >::update(), mic::mlnn::fully_connected::BinaryCorrelator< eT >::update(), mic::mlnn::fully_connected::Linear< float >::update(), and mic::mlnn::convolution::Convolution< float >::update().

template<typename eT = float>
mic::types::MatrixArray<eT> mic::mlnn::Layer< eT >::s
protected

States - contains input [x] and output [y] matrices.

Definition at line 753 of file Layer.hpp.

Referenced by mic::mlnn::convolution::Convolution< float >::backpropagade_dy_to_dW(), mic::mlnn::convolution::Convolution< float >::backpropagade_dy_to_dx(), mic::mlnn::fully_connected::SparseLinear< eT >::backward(), mic::mlnn::activation_function::Sigmoid< eT >::backward(), mic::mlnn::activation_function::ELU< eT >::backward(), mic::mlnn::activation_function::ReLU< eT >::backward(), mic::mlnn::cost_function::Softmax< float >::backward(), mic::mlnn::fully_connected::Linear< float >::backward(), mic::mlnn::fully_connected::Linear< float >::calculateMeanReconstructionError(), mic::mlnn::convolution::Convolution< float >::Convolution(), mic::mlnn::convolution::Cropping< eT >::forward(), mic::mlnn::convolution::Padding< eT >::forward(), mic::mlnn::regularisation::Dropout< eT >::forward(), mic::mlnn::activation_function::Sigmoid< eT >::forward(), mic::mlnn::activation_function::ReLU< eT >::forward(), mic::mlnn::activation_function::ELU< eT >::forward(), mic::mlnn::convolution::MaxPooling< eT >::forward(), mic::mlnn::experimental::ConvHebbian< eT >::forward(), mic::mlnn::cost_function::Softmax< float >::forward(), mic::mlnn::fully_connected::HebbianLinear< eT >::forward(), mic::mlnn::fully_connected::Linear< float >::forward(), mic::mlnn::fully_connected::BinaryCorrelator< eT >::forward(), mic::mlnn::Layer< float >::forward(), mic::mlnn::convolution::Convolution< float >::forward(), mic::mlnn::Layer< float >::getInputActivations(), mic::mlnn::fully_connected::Linear< float >::getInverseOutputActivations(), mic::mlnn::experimental::ConvHebbian< eT >::getOutputActivations(), mic::mlnn::Layer< float >::getOutputActivations(), mic::mlnn::experimental::ConvHebbian< eT >::getOutputReconstruction(), mic::mlnn::experimental::ConvHebbian< eT >::getOutputReconstructionError(), mic::mlnn::Layer< float >::getState(), mic::mlnn::Layer< float >::Layer(), mic::mlnn::Layer< float >::resizeBatch(), mic::mlnn::Layer< float >::serialize(), mic::mlnn::Layer< float >::setState(), mic::neural_nets::unit_tests::Linear2x3Float::SetUp(), mic::neural_nets::unit_tests::Linear2x3Double::SetUp(), mic::neural_nets::unit_tests::Linear50x100Double::SetUp(), mic::neural_nets::unit_tests::TEST(), mic::mlnn::experimental::ConvHebbian< eT >::update(), mic::mlnn::fully_connected::HebbianLinear< eT >::update(), and mic::mlnn::fully_connected::BinaryCorrelator< eT >::update().

template<typename eT = float>
std::vector< std::shared_ptr <mic::types::Matrix<eT> > > mic::mlnn::Layer< eT >::x_activations
protected

Vector containing activations of input neurons - used in visualization.

Definition at line 768 of file Layer.hpp.

Referenced by mic::mlnn::Layer< float >::getInputActivations().

template<typename eT = float>
std::vector< std::shared_ptr <mic::types::Matrix<eT> > > mic::mlnn::Layer< eT >::y_activations
protected

Vector containing activations of output neurons - used in visualization.

Definition at line 774 of file Layer.hpp.

Referenced by mic::mlnn::Layer< float >::getOutputActivations().


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