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);
67 const arma::Mat<eT>& gy,
76 InputDataType&
Delta()
const {
return delta; }
78 InputDataType&
Delta() {
return delta; }
83 template<
typename Archive>
91 OutputDataType outputParameter;
98#include "softmax_impl.hpp"
Implementation of the Softmax layer.
void Forward(const InputType &input, OutputType &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.
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...
InputDataType & Delta()
Modify the delta.
void serialize(Archive &, const unsigned int)
Serialize the layer.
InputDataType & Delta() const
Get the delta.
Softmax()
Create the Softmax object.
OutputDataType & OutputParameter()
Modify the output parameter.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.