|
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.
|
|
virtual std::string | getSlug () const =0 |
| The slug of the layers (name + main parameter value)
|
|
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 Eigen::MatrixXd | feedInputs (Eigen::MatrixXd inputs, bool training=false)=0 |
| 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 () |
|
|
void | setOutputs (Eigen::MatrixXd outputs) |
|
void | setOutputs (std::vector< double > outputs) |
| This method is used to set the outputs of the layer.
|
|
virtual Eigen::MatrixXd | computeOutputs (Eigen::MatrixXd inputs, bool training=false)=0 |
| This method is used to feed the inputs to the layer.
|
|
virtual void | init (int args) |
|
| Layer (std::tuple< int, int > inputShape) |
|
|
int | nNeurons |
|
Eigen::MatrixXd | outputs |
|
LayerType | type = LayerType::DEFAULT |
|
bool | trainingOnly = false |
|
|
class | Network |
|
class | cereal::access |
|
◆ computeOutputs()
virtual Eigen::MatrixXd NeuralNet::Layer::computeOutputs |
( |
Eigen::MatrixXd | inputs, |
|
|
bool | training = false ) |
|
protectedpure virtual |
This method is used to feed the inputs to the layer.
- Parameters
-
inputs | A vector of vectors of doubles representing the inputs (features) |
- Returns
- an Eigen::MatrixXd representing the computed outputs based on the layer's parameters
Implemented in NeuralNet::Dropout.
◆ feedInputs() [1/3]
virtual Eigen::MatrixXd NeuralNet::Layer::feedInputs |
( |
Eigen::MatrixXd | inputs, |
|
|
bool | training = false ) |
|
pure virtual |
This method is used to feed the inputs to the layer.
- Parameters
-
inputs | An Eigen::MatrixXd representing the inputs (features) |
- Returns
- an Eigen::MatrixXd representing the outputs of the layer
Implemented in NeuralNet::Dense, NeuralNet::Dropout, and NeuralNet::Flatten.
◆ feedInputs() [2/3]
virtual Eigen::MatrixXd NeuralNet::Layer::feedInputs |
( |
std::vector< double > | inputs, |
|
|
bool | training = false ) |
|
inlinevirtual |
This method is used to feed the inputs to the layer.
- Parameters
-
inputs | A vector of doubles representing the inputs (features) |
- Returns
- an Eigen::MatrixXd representing the outputs of the layer
◆ feedInputs() [3/3]
virtual void NeuralNet::Layer::feedInputs |
( |
std::vector< std::vector< std::vector< double > > > | inputs, |
|
|
bool | training = false ) |
|
inlinevirtual |
This method is used to feed the inputs to the layer.
- Parameters
-
inputs | A vector of vectors of doubles representing the inputs (features) |
- Returns
- void
Reimplemented in NeuralNet::Flatten.
◆ getNumNeurons()
int NeuralNet::Layer::getNumNeurons |
( |
| ) |
const |
|
inline |
This method get the number of neurons actually in the layer.
- Returns
- The number of neurons in the layer
◆ getOutputs()
Eigen::MatrixXd NeuralNet::Layer::getOutputs |
( |
| ) |
const |
|
inline |
This method get the layer's outputs.
- Returns
- an Eigen::Eigen::MatrixXd representing the layer's outputs
◆ getSlug()
virtual std::string NeuralNet::Layer::getSlug |
( |
| ) |
const |
|
pure virtual |
◆ init()
virtual void NeuralNet::Layer::init |
( |
int | args | ) |
|
|
inlineprotectedvirtual |
This function will be used to properly initialize the Layer It's being done like this because of the number of neurons of the previous layer that's unkown prior
Reimplemented in NeuralNet::Dropout.
◆ setOutputs() [1/2]
void NeuralNet::Layer::setOutputs |
( |
Eigen::MatrixXd | outputs | ) |
|
|
inlineprotected |
- Parameters
-
outputs | the outputs to store |
◆ setOutputs() [2/2]
void NeuralNet::Layer::setOutputs |
( |
std::vector< double > | outputs | ) |
|
|
inlineprotected |
This method is used to set the outputs of the layer.
- Parameters
-
outputs | A vector of doubles representing the outputs of the layer |
- Returns
- void
- Note
- This method is used for the input layer (the first layer of the network)
◆ typeStr()
const std::string NeuralNet::Layer::typeStr |
( |
| ) |
|
|
inline |
Returns the layer type as string
- Note
- Returns "Base" for base class
Layer
and "Unknown" if no type specified.
The documentation for this class was generated from the following file:
- /github/workspace/src/NeuralNet/layers/Layer.hpp