|
| Flatten (std::tuple< int, int > inputShape) |
| Construct a new Flatten object.
|
|
std::string | getSlug () const override |
| Flatten layer's slug.
|
|
Eigen::MatrixXd | flatten (std::vector< std::vector< std::vector< double > > > inputs) |
| This method flattens a 3D vector into a 2D Eigen::MatrixXd.
|
|
void | feedInputs (std::vector< std::vector< std::vector< double > > > inputs, bool training) override |
| This method is used to feed the inputs to the layer.
|
|
Eigen::MatrixXd | feedInputs (Eigen::MatrixXd inputs, bool training) override |
| This method is used to feed the inputs to the 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.
|
|
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 void | init (int args) |
|
| Layer (std::tuple< int, int > inputShape) |
|
int | nNeurons |
|
Eigen::MatrixXd | outputs |
|
LayerType | type = LayerType::DEFAULT |
|
bool | trainingOnly = false |
|
◆ Flatten()
NeuralNet::Flatten::Flatten |
( |
std::tuple< int, int > | inputShape | ) |
|
|
inline |
Construct a new Flatten object.
This type of Layer is perfect as an input layer since its sole purpose is to flatten a given input
- Parameters
-
inputShape | The shape of the input to be flattened |
◆ feedInputs() [1/2]
Eigen::MatrixXd NeuralNet::Flatten::feedInputs |
( |
Eigen::MatrixXd | inputs, |
|
|
bool | training ) |
|
inlineoverridevirtual |
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
Implements NeuralNet::Layer.
◆ feedInputs() [2/2]
void NeuralNet::Flatten::feedInputs |
( |
std::vector< std::vector< std::vector< double > > > | inputs, |
|
|
bool | training ) |
|
inlineoverridevirtual |
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 from NeuralNet::Layer.
◆ flatten()
Eigen::MatrixXd NeuralNet::Flatten::flatten |
( |
std::vector< std::vector< std::vector< double > > > | inputs | ) |
|
|
inline |
This method flattens a 3D vector into a 2D Eigen::MatrixXd.
- Parameters
-
inputs | The 3D vector to be flattened |
- Returns
- Eigen::MatrixXd The flattened 2D Eigen::MatrixXd
◆ getSlug()
std::string NeuralNet::Flatten::getSlug |
( |
| ) |
const |
|
inlineoverridevirtual |
The documentation for this class was generated from the following file: