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...

Public Member Functions

 DiceLoss (const double smooth=1)
 Create the DiceLoss object. 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...

 
template
<
typename
PredictionType
,
typename
TargetType
>
PredictionType::elem_type Forward (const PredictionType &prediction, const TargetType &target)
 Computes the dice loss function. More...

 
OutputDataType & OutputParameter () const
 Get the output parameter. More...

 
OutputDataType & OutputParameter ()
 Modify the output parameter. More...

 
template
<
typename
Archive
>
void serialize (Archive &ar, const uint32_t)
 Serialize the layer. More...

 
double Smooth () const
 Get the smooth. More...

 
double & Smooth ()
 Modify the smooth. More...

 

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).

Definition at line 50 of file dice_loss.hpp.

Constructor & Destructor Documentation

◆ DiceLoss()

DiceLoss ( const double  smooth = 1)

Create the DiceLoss object.

Parameters
smoothThe Laplace smoothing parameter.

Member Function Documentation

◆ Backward()

void 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()

PredictionType::elem_type Forward ( const PredictionType &  prediction,
const TargetType &  target 
)

Computes the dice loss function.

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

◆ OutputParameter() [1/2]

OutputDataType& OutputParameter ( ) const
inline

Get the output parameter.

Definition at line 85 of file dice_loss.hpp.

◆ OutputParameter() [2/2]

OutputDataType& OutputParameter ( )
inline

Modify the output parameter.

Definition at line 87 of file dice_loss.hpp.

◆ serialize()

void serialize ( Archive &  ar,
const uint32_t   
)

Serialize the layer.

Referenced by DiceLoss< InputDataType, OutputDataType >::Smooth().

◆ Smooth() [1/2]

double Smooth ( ) const
inline

Get the smooth.

Definition at line 90 of file dice_loss.hpp.

◆ Smooth() [2/2]

double& Smooth ( )
inline

Modify the smooth.

Definition at line 92 of file dice_loss.hpp.

References DiceLoss< InputDataType, OutputDataType >::serialize().


The documentation for this class was generated from the following file:
  • /home/ryan/src/mlpack.org/_src/mlpack-git/src/mlpack/methods/ann/loss_functions/dice_loss.hpp