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 typename InputType::elem_type
Forward(
const InputType& input,
52 const TargetType& target);
65 template<
typename InputType,
typename TargetType,
typename OutputType>
67 const TargetType& target,
81 OutputDataType&
Delta()
const {
return delta; }
83 OutputDataType&
Delta() {
return delta; }
88 template<
typename Archive>
96 InputDataType inputParameter;
99 OutputDataType outputParameter;
106#include "negative_log_likelihood_impl.hpp"
Implementation of the negative log likelihood layer.
InputDataType & InputParameter() const
Get the input parameter.
NegativeLogLikelihood()
Create the NegativeLogLikelihoodLayer object.
InputDataType & InputParameter()
Modify the input parameter.
OutputDataType & OutputParameter() const
Get the output parameter.
OutputDataType & Delta() const
Get the delta.
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.
InputType::elem_type Forward(const InputType &input, const TargetType &target)
Computes the Negative log likelihood.
OutputDataType & OutputParameter()
Modify the output parameter.
OutputDataType & Delta()
Modify the delta.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.