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
66 template<
typename InputType,
typename TargetType>
67 typename InputType::elem_type
Forward(
const InputType& input,
68 const TargetType& target);
77 template<
typename InputType,
typename TargetType,
typename OutputType>
79 const TargetType& target,
88 double Smooth()
const {
return smooth; }
95 template<
typename Archive>
100 OutputDataType outputParameter;
110#include "dice_loss_impl.hpp"
The dice loss performance function measures the network's performance according to the dice coefficie...
DiceLoss(const double smooth=1)
Create the DiceLoss object.
OutputDataType & OutputParameter() const
Get the output parameter.
void Backward(const InputType &input, const TargetType &target, OutputType &output)
Ordinary feed backward pass of a neural network.
double & Smooth()
Modify the smooth.
InputType::elem_type Forward(const InputType &input, const TargetType &target)
Computes the dice loss function.
double Smooth() const
Get the smooth.
OutputDataType & OutputParameter()
Modify the output parameter.
void serialize(Archive &ar, const unsigned int)
Serialize the layer.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.