mlpack
Public Member Functions | List of all members
mlpack::ann::DiceLoss< InputDataType, OutputDataType > Class Template Reference

The dice loss performance function measures the network's performance according to the dice coefficient between the input and target distributions. More...

#include <dice_loss.hpp>

Public Member Functions

 DiceLoss (const double smooth=1)
 Create the DiceLoss object. More...
 
template<typename PredictionType , typename TargetType >
PredictionType::elem_type Forward (const PredictionType &prediction, const TargetType &target)
 Computes the dice loss function. More...
 
template<typename PredictionType , typename TargetType , typename LossType >
void Backward (const PredictionType &prediction, const TargetType &target, LossType &loss)
 Ordinary feed backward pass of a neural network. More...
 
OutputDataType & OutputParameter () const
 Get the output parameter.
 
OutputDataType & OutputParameter ()
 Modify the output parameter.
 
double Smooth () const
 Get the smooth.
 
double & Smooth ()
 Modify the smooth.
 
template<typename Archive >
void serialize (Archive &ar, const uint32_t)
 Serialize the layer.
 

Detailed Description

template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
class mlpack::ann::DiceLoss< InputDataType, OutputDataType >

The dice loss performance function measures the network's performance according to the dice coefficient between the input and target distributions.

For more information see the following.

@article{Milletari2016,
author = {Fausto Milletari and Nassir Navab and Seyed{-}Ahmad Ahmadi},
title = {V-Net: Fully Convolutional Neural Networks for
Volumetric Medical Image Segmentation},
journal = {CoRR},
volume = {abs/1606.04797},
year = {2016},
url = {http://arxiv.org/abs/1606.04797},
archivePrefix = {arXiv},
eprint = {1606.04797},
}
Template Parameters
InputDataTypeType of the input data (arma::colvec, arma::mat, arma::sp_mat or arma::cube).
OutputDataTypeType of the output data (arma::colvec, arma::mat, arma::sp_mat or arma::cube).

Constructor & Destructor Documentation

◆ DiceLoss()

template<typename InputDataType , typename OutputDataType >
mlpack::ann::DiceLoss< InputDataType, OutputDataType >::DiceLoss ( const double  smooth = 1)

Create the DiceLoss object.

Parameters
smoothThe Laplace smoothing parameter.

Member Function Documentation

◆ Backward()

template<typename InputDataType , typename OutputDataType >
template<typename PredictionType , typename TargetType , typename LossType >
void mlpack::ann::DiceLoss< InputDataType, OutputDataType >::Backward ( const PredictionType &  prediction,
const TargetType &  target,
LossType &  loss 
)

Ordinary feed backward pass of a neural network.

Parameters
predictionPredictions used for evaluating the specified loss function.
targetThe target vector.
lossThe calculated error.

◆ Forward()

template<typename InputDataType , typename OutputDataType >
template<typename PredictionType , typename TargetType >
PredictionType::elem_type mlpack::ann::DiceLoss< InputDataType, OutputDataType >::Forward ( const PredictionType &  prediction,
const TargetType &  target 
)

Computes the dice loss function.

Parameters
predictionPredictions used for evaluating the specified loss function.
targetThe target vector.

The documentation for this class was generated from the following files: