12 #ifndef MLPACK_METHODS_ANN_LOSS_FUNCTION_RECONSTRUCTION_LOSS_IMPL_HPP 13 #define MLPACK_METHODS_ANN_LOSS_FUNCTION_RECONSTRUCTION_LOSS_IMPL_HPP 21 template<
typename InputDataType,
typename OutputDataType,
typename DistType>
31 template<
typename InputDataType,
typename OutputDataType,
typename DistType>
32 template<
typename PredictionType,
typename TargetType>
33 typename PredictionType::elem_type
35 const PredictionType& prediction,
const TargetType& target)
37 dist = DistType(prediction);
38 return -dist.LogProbability(target);
41 template<
typename InputDataType,
typename OutputDataType,
typename DistType>
42 template<
typename PredictionType,
typename TargetType,
typename LossType>
44 const PredictionType& ,
45 const TargetType& target,
48 dist.LogProbBackward(target, loss);
52 template<
typename InputDataType,
typename OutputDataType,
typename DistType>
53 template<
typename Archive>
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
void serialize(Archive &ar, const uint32_t)
Serialize the layer.
Definition: reconstruction_loss_impl.hpp:54
The reconstruction loss performance function measures the network's performance equal to the negative...
Definition: reconstruction_loss.hpp:37
PredictionType::elem_type Forward(const PredictionType &prediction, const TargetType &target)
Computes the reconstruction loss.
Definition: reconstruction_loss_impl.hpp:34
void Backward(const PredictionType &prediction, const TargetType &target, LossType &loss)
Ordinary feed backward pass of a neural network.
Definition: reconstruction_loss_impl.hpp:43