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
51 template<
typename PredictionType,
typename TargetType>
52 typename PredictionType::elem_type
Forward(
const PredictionType& prediction,
53 const TargetType& target);
67 template<
typename PredictionType,
typename TargetType,
typename LossType>
68 void Backward(
const PredictionType& prediction,
69 const TargetType& target,
83 OutputDataType&
Delta()
const {
return delta; }
85 OutputDataType&
Delta() {
return delta; }
90 template<
typename Archive>
91 void serialize(Archive& ,
const uint32_t );
98 InputDataType inputParameter;
101 OutputDataType outputParameter;
void Backward(const PredictionType &prediction, const TargetType &target, LossType &loss)
Ordinary feed backward pass of a neural network.
Definition: negative_log_likelihood_impl.hpp:49
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
OutputDataType & OutputParameter() const
Get the output parameter.
Definition: negative_log_likelihood.hpp:78
OutputDataType & OutputParameter()
Modify the output parameter.
Definition: negative_log_likelihood.hpp:80
The core includes that mlpack expects; standard C++ includes and Armadillo.
NegativeLogLikelihood()
Create the NegativeLogLikelihoodLayer object.
Definition: negative_log_likelihood_impl.hpp:22
InputDataType & InputParameter()
Modify the input parameter.
Definition: negative_log_likelihood.hpp:75
Implementation of the negative log likelihood layer.
Definition: negative_log_likelihood.hpp:35
InputDataType & InputParameter() const
Get the input parameter.
Definition: negative_log_likelihood.hpp:73
void serialize(Archive &, const uint32_t)
Serialize the layer.
Definition: negative_log_likelihood_impl.hpp:66
PredictionType::elem_type Forward(const PredictionType &prediction, const TargetType &target)
Computes the Negative log likelihood.
Definition: negative_log_likelihood_impl.hpp:30
OutputDataType & Delta()
Modify the delta.
Definition: negative_log_likelihood.hpp:85
OutputDataType & Delta() const
Get the delta.
Definition: negative_log_likelihood.hpp:83