14 #ifndef MLPACK_METHODS_ANN_LAYER_SOFTMAX_HPP 15 #define MLPACK_METHODS_ANN_LAYER_SOFTMAX_HPP 35 typename InputDataType = arma::mat,
36 typename OutputDataType = arma::mat
53 template<
typename InputType,
typename OutputType>
54 void Forward(
const InputType& input, OutputType& output);
66 void Backward(
const arma::Mat<eT>& input,
67 const arma::Mat<eT>& gy,
76 InputDataType&
Delta()
const {
return delta; }
78 InputDataType&
Delta() {
return delta; }
83 template<
typename Archive>
84 void serialize(Archive& ,
const unsigned int );
91 OutputDataType outputParameter;
98 #include "softmax_impl.hpp" Linear algebra utility functions, generally performed on matrices or vectors.
OutputDataType & OutputParameter()
Modify the output parameter.
void Forward(const InputType &input, OutputType &output)
Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activ...
The core includes that mlpack expects; standard C++ includes and Armadillo.
InputDataType & Delta() const
Get the delta.
Implementation of the Softmax layer.
Softmax()
Create the Softmax object.
InputDataType & Delta()
Modify the delta.
void serialize(Archive &, const unsigned int)
Serialize the layer.
OutputDataType & OutputParameter() const
Get the output parameter.
void Backward(const arma::Mat< eT > &input, 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...