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
50 template<
typename InputType,
typename TargetType>
51 double Forward(
const InputType&& input, TargetType&& target);
64 template<
typename InputType,
typename TargetType,
typename OutputType>
65 void Backward(
const InputType&& input,
66 const TargetType&& target,
80 OutputDataType&
Delta()
const {
return delta; }
82 OutputDataType&
Delta() {
return delta; }
87 template<
typename Archive>
88 void serialize(Archive& ,
const unsigned int );
95 InputDataType inputParameter;
98 OutputDataType outputParameter;
105 #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)
Computes the Negative log likelihood.
InputDataType & InputParameter()
Modify the input parameter.
OutputDataType & Delta() const
Get the delta.