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;
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
OutputDataType & OutputParameter()
Modify the output parameter.
Definition: select.hpp:70
size_t const & NumElements() const
Get the number of elements selected.
Definition: select.hpp:81
The core includes that mlpack expects; standard C++ includes and Armadillo.
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...
Definition: select_impl.hpp:48
OutputDataType & OutputParameter() const
Get the output parameter.
Definition: select.hpp:68
The select module selects the specified column from a given input matrix.
Definition: select.hpp:32
OutputDataType & Delta()
Modify the delta.
Definition: select.hpp:75
Select(const size_t index=0, const size_t elements=0)
Create the Select object.
Definition: select_impl.hpp:22
size_t const & Index() const
Get the column index.
Definition: select.hpp:78
void serialize(Archive &ar, const uint32_t)
Serialize the layer.
Definition: select_impl.hpp:65
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...
Definition: select_impl.hpp:33
OutputDataType & Delta() const
Get the delta.
Definition: select.hpp:73