12 #ifndef MLPACK_METHODS_ANN_LOSS_FUNCTIONS_DICE_LOSS_HPP 13 #define MLPACK_METHODS_ANN_LOSS_FUNCTIONS_DICE_LOSS_HPP 45 typename InputDataType = arma::mat,
46 typename OutputDataType = arma::mat
64 template<
typename InputType,
typename TargetType>
65 double Forward(
const InputType&& input,
const TargetType&& target);
74 template<
typename InputType,
typename TargetType,
typename OutputType>
75 void Backward(
const InputType&& input,
76 const TargetType&& target,
85 double Smooth()
const {
return smooth; }
92 template<
typename Archive>
93 void serialize(Archive& ar,
const unsigned int );
97 OutputDataType outputParameter;
107 #include "dice_loss_impl.hpp" The dice loss performance function measures the network's performance according to the dice coefficie...
The core includes that mlpack expects; standard C++ includes and Armadillo.
double & Smooth()
Modify the smooth.
void Backward(const InputType &&input, const TargetType &&target, OutputType &&output)
Ordinary feed backward pass of a neural network.
OutputDataType & OutputParameter() const
Get the output parameter.
void serialize(Archive &ar, const unsigned int)
Serialize the layer.
double Smooth() const
Get the smooth.
DiceLoss(const double smooth=1)
Create the DiceLoss object.
double Forward(const InputType &&input, const TargetType &&target)
Computes the dice loss function.
OutputDataType & OutputParameter()
Modify the output parameter.