12 #ifndef MLPACK_METHODS_ANN_LOSS_FUNCTIONS_DICE_LOSS_HPP 13 #define MLPACK_METHODS_ANN_LOSS_FUNCTIONS_DICE_LOSS_HPP 47 typename InputDataType = arma::mat,
48 typename OutputDataType = arma::mat
67 template<
typename PredictionType,
typename TargetType>
68 typename PredictionType::elem_type
Forward(
const PredictionType& prediction,
69 const TargetType& target);
79 template<
typename PredictionType,
typename TargetType,
typename LossType>
80 void Backward(
const PredictionType& prediction,
81 const TargetType& target,
90 double Smooth()
const {
return smooth; }
97 template<
typename Archive>
98 void serialize(Archive& ar,
const uint32_t );
102 OutputDataType outputParameter;
112 #include "dice_loss_impl.hpp" The dice loss performance function measures the network's performance according to the dice coefficie...
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
void Backward(const PredictionType &prediction, const TargetType &target, LossType &loss)
Ordinary feed backward pass of a neural network.
double & Smooth()
Modify the smooth.
OutputDataType & OutputParameter() const
Get the output parameter.
void serialize(Archive &ar, const uint32_t)
Serialize the layer.
double Smooth() const
Get the smooth.
DiceLoss(const double smooth=1)
Create the DiceLoss object.
PredictionType::elem_type Forward(const PredictionType &prediction, const TargetType &target)
Computes the dice loss function.
OutputDataType & OutputParameter()
Modify the output parameter.