12 #ifndef MLPACK_METHODS_ANN_LAYER_NEGATIVE_LOG_LIKELIHOOD_HPP 13 #define MLPACK_METHODS_ANN_LAYER_NEGATIVE_LOG_LIKELIHOOD_HPP 29 template<
typename MatType = arma::mat>
52 double Forward(
const MatType& prediction,
53 const MatType& target);
67 void Backward(
const MatType& prediction,
68 const MatType& target,
80 template<
typename Archive>
81 void serialize(Archive& ,
const uint32_t );
95 #include "negative_log_likelihood_impl.hpp" bool & Reduction()
Modify the type of reduction used.
NegativeLogLikelihoodType(const bool reduction=true)
Create the NegativeLogLikelihoodTypeLayer object.
void Backward(const MatType &prediction, const MatType &target, MatType &loss)
Ordinary feed backward pass of a neural network.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes, Armadillo, cereal, and a few basic mlpa...
double Forward(const MatType &prediction, const MatType &target)
Computes the Negative log likelihood.
Implementation of the negative log likelihood layer.
void serialize(Archive &, const uint32_t)
Serialize the layer.
NegativeLogLikelihoodType< arma::mat > NegativeLogLikelihood
bool Reduction() const
Get the reduction type, represented as boolean (false 'mean' reduction, true 'sum' reduction)...