12#ifndef MLPACK_METHODS_ANN_LAYER_SELECT_HPP
13#define MLPACK_METHODS_ANN_LAYER_SELECT_HPP
29 typename InputDataType = arma::mat,
30 typename OutputDataType = arma::mat
41 Select(
const size_t index = 0,
const size_t elements = 0);
51 void Forward(
const arma::Mat<eT>& input, arma::Mat<eT>& output);
64 const arma::Mat<eT>& gy,
73 OutputDataType&
Delta()
const {
return delta; }
75 OutputDataType&
Delta() {
return delta; }
78 size_t const&
Index()
const {
return index; }
86 template<
typename Archive>
100 OutputDataType outputParameter;
107#include "select_impl.hpp"
The select module selects the specified column from a given input matrix.
void Forward(const arma::Mat< eT > &input, arma::Mat< eT > &output)
Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activ...
Select(const size_t index=0, const size_t elements=0)
Create the Select object.
OutputDataType & OutputParameter() const
Get the output parameter.
OutputDataType & Delta() const
Get the delta.
size_t const & NumElements() const
Get the number of elements selected.
void Backward(const arma::Mat< eT > &, const arma::Mat< eT > &gy, arma::Mat< eT > &g)
Ordinary feed backward pass of a neural network, calculating the function f(x) by propagating x backw...
OutputDataType & OutputParameter()
Modify the output parameter.
size_t const & Index() const
Get the column index.
void serialize(Archive &ar, const unsigned int)
Serialize the layer.
OutputDataType & Delta()
Modify the delta.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.