NeuralNet 1.0
Loading...
Searching...
No Matches
NeuralNet::Dense Class Reference
Inheritance diagram for NeuralNet::Dense:
NeuralNet::Layer

Public Member Functions

 Dense (int nNeurons, ACTIVATION activation=ACTIVATION::SIGMOID, WEIGHT_INIT weightInit=WEIGHT_INIT::RANDOM, int bias=0)
 
Eigen::MatrixXd getWeights () const
 This method gets the layer's weights.
 
Eigen::MatrixXd getBiases () const
 Return the biases of the layer.
 
Eigen::MatrixXd getOutputs () const
 This method get the layer's outputs.
 
void printWeights ()
 Method to print layer's weights.
 
std::string getSlug () const override
 Dense layer slug.
 
virtual Eigen::MatrixXd feedInputs (Eigen::MatrixXd inputs, bool training=false) override
 This method is used to feed the inputs to the layer.
 
- Public Member Functions inherited from NeuralNet::Layer
Eigen::MatrixXd getOutputs () const
 This method get the layer's outputs.
 
int getNumNeurons () const
 This method get the number of neurons actually in the layer.
 
void printOutputs ()
 Method to print layer's outputs.
 
virtual Eigen::MatrixXd feedInputs (std::vector< double > inputs, bool training=false)
 This method is used to feed the inputs to the layer.
 
virtual void feedInputs (std::vector< std::vector< std::vector< double > > > inputs, bool training=false)
 This method is used to feed the inputs to the layer.
 
const std::string typeStr ()
 

Friends

class cereal::access
 
class Network
 

Additional Inherited Members

- Protected Member Functions inherited from NeuralNet::Layer
void setOutputs (Eigen::MatrixXd outputs)
 
void setOutputs (std::vector< double > outputs)
 This method is used to set the outputs of the layer.
 
 Layer (std::tuple< int, int > inputShape)
 
- Protected Attributes inherited from NeuralNet::Layer
int nNeurons
 
Eigen::MatrixXd outputs
 
LayerType type = LayerType::DEFAULT
 
bool trainingOnly = false
 

Member Function Documentation

◆ feedInputs()

virtual Eigen::MatrixXd NeuralNet::Dense::feedInputs ( Eigen::MatrixXd inputs,
bool training = false )
inlineoverridevirtual

This method is used to feed the inputs to the layer.

Parameters
inputsAn Eigen::MatrixXd representing the inputs (features)
Returns
an Eigen::MatrixXd representing the outputs of the layer

Implements NeuralNet::Layer.

◆ getBiases()

Eigen::MatrixXd NeuralNet::Dense::getBiases ( ) const
inline

Return the biases of the layer.

Returns
an Eigen::Matrix representing the biases

◆ getOutputs()

Eigen::MatrixXd NeuralNet::Dense::getOutputs ( ) const
inline

This method get the layer's outputs.

Returns
an Eigen::Eigen::MatrixXd representing the layer's outputs

◆ getSlug()

std::string NeuralNet::Dense::getSlug ( ) const
inlineoverridevirtual

Dense layer slug.

Implements NeuralNet::Layer.

◆ getWeights()

Eigen::MatrixXd NeuralNet::Dense::getWeights ( ) const
inline

This method gets the layer's weights.

Returns
an Eigen::MatrixXd representing the weights

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