mlpack 3.4.2
|
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 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 > | |
InputType::elem_type | Forward (const InputType &input, const TargetType &target) |
Computes the dice loss function. More... | |
OutputDataType & | OutputParameter () |
Modify the output parameter. More... | |
OutputDataType & | OutputParameter () const |
Get the output parameter. More... | |
template<typename Archive > | |
void | serialize (Archive &ar, const unsigned int) |
Serialize the layer. More... | |
double & | Smooth () |
Modify the smooth. More... | |
double | Smooth () const |
Get the smooth. More... | |
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.
InputDataType | Type of the input data (arma::colvec, arma::mat, arma::sp_mat or arma::cube). |
OutputDataType | Type of the output data (arma::colvec, arma::mat, arma::sp_mat or arma::cube). |
Definition at line 50 of file dice_loss.hpp.
DiceLoss | ( | const double | smooth = 1 | ) |
Create the DiceLoss object.
smooth | The Laplace smoothing parameter. |
void Backward | ( | const InputType & | input, |
const TargetType & | target, | ||
OutputType & | output | ||
) |
Ordinary feed backward pass of a neural network.
input | The propagated input activation. |
target | The target vector. |
output | The calculated error. |
InputType::elem_type Forward | ( | const InputType & | input, |
const TargetType & | target | ||
) |
Computes the dice loss function.
input | Input data used for evaluating the specified function. |
target | The target vector. |
|
inline |
Modify the output parameter.
Definition at line 85 of file dice_loss.hpp.
|
inline |
Get the output parameter.
Definition at line 83 of file dice_loss.hpp.
void serialize | ( | Archive & | ar, |
const unsigned int | |||
) |
Serialize the layer.
|
inline |
Modify the smooth.
Definition at line 90 of file dice_loss.hpp.
|
inline |
Get the smooth.
Definition at line 88 of file dice_loss.hpp.