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>
87 void serialize(Archive& ar,
const uint32_t );
100 OutputDataType outputParameter;
107 #include "select_impl.hpp" OutputDataType & Delta() const
Get the delta.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
OutputDataType & OutputParameter()
Modify the output parameter.
void serialize(Archive &ar, const uint32_t)
Serialize the layer.
The select module selects the specified column from a given input matrix.
size_t const & NumElements() const
Get the number of elements selected.
Select(const size_t index=0, const size_t elements=0)
Create the Select object.
OutputDataType & Delta()
Modify the delta.
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...
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...
OutputDataType & OutputParameter() const
Get the output parameter.
size_t const & Index() const
Get the column index.