Collective Variables Module - Developer Documentation
Loading...
Searching...
No Matches
neuralnetworkCV::neuralNetworkCompute Class Reference

Public Member Functions

 neuralNetworkCompute (const std::vector< denseLayer > &dense_layers)
bool addDenseLayer (const denseLayer &layer)
const std::vector< double > & input () const
std::vector< double > & input ()
void compute ()
 compute the values and the gradients of all output nodes
double getOutput (const size_t i) const
double getGradient (const size_t i, const size_t j) const
const denseLayer & getLayer (const size_t i) const
 get a specified layer
size_t getNumberOfLayers () const
 get the number of layers

Static Private Member Functions

static std::vector< std::vector< double > > multiply_matrix (const std::vector< std::vector< double > > &A, const std::vector< std::vector< double > > &B)
 helper function: multiply two matrix constructed from 2D vector

Private Attributes

std::vector< denseLayer > m_dense_layers
std::vector< double > m_input
std::vector< std::vector< double > > m_layers_output
 temporary output for each layer, useful to speedup the gradients' calculation
std::vector< std::vector< std::vector< double > > > m_grads_tmp
std::vector< std::vector< double > > m_chained_grad

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