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
InputType
,
typename
TargetType
,
typename
OutputType
>
void Backward (const InputType &&input, const TargetType &&target, OutputType &&output)
 Ordinary feed backward pass of a neural network. More...

 
template
<
typename
InputType
,
typename
TargetType
>
double Forward (const InputType &&input, 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 unsigned int)
 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.

{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 48 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 InputType &&  input,
const TargetType &&  target,
OutputType &&  output 
)

Ordinary feed backward pass of a neural network.

Parameters
inputThe propagated input activation.
targetThe target vector.
outputThe calculated error.

◆ Forward()

double Forward ( const InputType &&  input,
const TargetType &&  target 
)

Computes the dice loss function.

Parameters
inputInput data used for evaluating the specified function.
targetThe target vector.

◆ OutputParameter() [1/2]

OutputDataType& OutputParameter ( ) const
inline

Get the output parameter.

Definition at line 80 of file dice_loss.hpp.

◆ OutputParameter() [2/2]

OutputDataType& OutputParameter ( )
inline

Modify the output parameter.

Definition at line 82 of file dice_loss.hpp.

◆ serialize()

void serialize ( Archive &  ar,
const unsigned  int 
)

Serialize the layer.

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

◆ Smooth() [1/2]

double Smooth ( ) const
inline

Get the smooth.

Definition at line 85 of file dice_loss.hpp.

◆ Smooth() [2/2]

double& Smooth ( )
inline

Modify the smooth.

Definition at line 87 of file dice_loss.hpp.

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


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