12 #ifndef MLPACK_METHODS_ANN_LAYER_LOG_SOFTMAX_HPP 13 #define MLPACK_METHODS_ANN_LAYER_LOG_SOFTMAX_HPP 33 typename InputDataType = arma::mat,
34 typename OutputDataType = arma::mat
51 template<
typename InputType,
typename OutputType>
52 void Forward(
const InputType& input, OutputType& output);
64 void Backward(
const arma::Mat<eT>& input,
65 const arma::Mat<eT>& gy,
74 InputDataType&
Delta()
const {
return delta; }
76 InputDataType&
Delta() {
return delta; }
81 template<
typename Archive>
82 void serialize(Archive& ,
const uint32_t );
89 OutputDataType outputParameter;
Implementation of the log softmax layer.
Definition: log_softmax.hpp:36
void Forward(const InputType &input, OutputType &output)
Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activ...
Definition: log_softmax_impl.hpp:29
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
OutputDataType & OutputParameter() const
Get the output parameter.
Definition: log_softmax.hpp:69
The core includes that mlpack expects; standard C++ includes and Armadillo.
InputDataType & Delta()
Modify the delta.
Definition: log_softmax.hpp:76
OutputDataType & OutputParameter()
Modify the output parameter.
Definition: log_softmax.hpp:71
void serialize(Archive &, const uint32_t)
Serialize the layer.
Definition: log_softmax_impl.hpp:76
InputDataType & Delta() const
Get the delta.
Definition: log_softmax.hpp:74
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...
Definition: log_softmax_impl.hpp:66
LogSoftMax()
Create the LogSoftmax object.
Definition: log_softmax_impl.hpp:22