12 #ifndef MLPACK_METHODS_ANN_LAYER_NEGATIVE_LOG_LIKELIHOOD_HPP 13 #define MLPACK_METHODS_ANN_LAYER_NEGATIVE_LOG_LIKELIHOOD_HPP 32 typename InputDataType = arma::mat,
33 typename OutputDataType = arma::mat
49 template<
typename InputType,
typename TargetType>
50 double Forward(
const InputType&& input, TargetType&& target);
63 template<
typename InputType,
typename TargetType,
typename OutputType>
64 void Backward(
const InputType&& input,
65 const TargetType&& target,
79 OutputDataType&
Delta()
const {
return delta; }
81 OutputDataType&
Delta() {
return delta; }
86 template<
typename Archive>
87 void serialize(Archive& ,
const unsigned int );
94 InputDataType inputParameter;
97 OutputDataType outputParameter;
104 #include "negative_log_likelihood_impl.hpp" OutputDataType & OutputParameter() const
Get the output parameter.
OutputDataType & Delta()
Modify the delta.
The core includes that mlpack expects; standard C++ includes and Armadillo.
Implementation of the negative log likelihood layer.
NegativeLogLikelihood()
Create the NegativeLogLikelihoodLayer object.
InputDataType & InputParameter() const
Get the input parameter.
void Backward(const InputType &&input, const TargetType &&target, OutputType &&output)
Ordinary feed backward pass of a neural network.
void serialize(Archive &, const unsigned int)
Serialize the layer.
OutputDataType & OutputParameter()
Modify the output parameter.
double Forward(const InputType &&input, TargetType &&target)
InputDataType & InputParameter()
Modify the input parameter.
OutputDataType & Delta() const
Get the delta.