![]() |
Microscopy Image Browser 2.91
MIB
|
This layer implements the generalized Dice loss function for training semantic segmentation networks. More...
Public Member Functions | |
dicePixelCustomClassificationLayer (name, dataDimension, useClasses) | |
layer = dicePixelClassificationLayer(name, dataDimension, useClasses) creates a Dice pixel classification layer with the specified name. | |
function loss = | forwardLoss (Y, T) |
loss = forwardLoss(layer, Y, T) returns the Dice loss between the predictions Y and the training targets T. | |
dicePixelCustomClassificationLayer (name, dataDimension) | |
layer = dicePixelClassificationLayer(name) creates a Dice pixel classification layer with the specified name. | |
function loss = | forwardLoss (Y, T) |
function dLdY = | backwardLoss (Y, T) |
dLdY = backwardLoss(layer, Y, T) returns the derivatives of the Dice loss with respect to the predictions Y. | |
Public Attributes | |
dataDimension | |
use mask as the last material of the model value defining dimension of the data: 2, 2.5, 3 | |
useClasses = "[]" | |
indices of class ids to be used for calculation of loss | |
Static Public Attributes | |
static const | Epsilon = 1e-8 |
Small constant to prevent division by zero. | |
This layer implements the generalized Dice loss function for training semantic segmentation networks.
dicePixelCustomClassificationLayer.dicePixelCustomClassificationLayer | ( | name, | |
dataDimension, | |||
useClasses ) |
layer = dicePixelClassificationLayer(name, dataDimension, useClasses) creates a Dice pixel classification layer with the specified name.
name | name of the layer |
useClasses | vector with classes to use for calculation of the loss function, when empty all classes are taken into account |
dimension | number specifying data dimension, 2-2D or 2.5D, 3-3D |
References dataDimension, and useClasses.
dicePixelCustomClassificationLayer.dicePixelCustomClassificationLayer | ( | name, | |
dataDimension ) |
layer = dicePixelClassificationLayer(name) creates a Dice pixel classification layer with the specified name.
name | name of the layer |
References dataDimension.
function dLdY = dicePixelCustomClassificationLayer.backwardLoss | ( | Y, | |
T ) |
dLdY = backwardLoss(layer, Y, T) returns the derivatives of the Dice loss with respect to the predictions Y.
References backwardLoss(), and N.
Referenced by backwardLoss().
function loss = dicePixelCustomClassificationLayer.forwardLoss | ( | Y, | |
T ) |
loss = forwardLoss(layer, Y, T) returns the Dice loss between the predictions Y and the training targets T.
References N.
function loss = dicePixelCustomClassificationLayer.forwardLoss | ( | Y, | |
T ) |
References dataDimension, Epsilon, N, and useClasses.
dicePixelCustomClassificationLayer.dataDimension |
use mask as the last material of the model value defining dimension of the data: 2, 2.5, 3
Referenced by dicePixelCustomClassificationLayer(), dicePixelCustomClassificationLayer(), and forwardLoss().
|
static |
dicePixelCustomClassificationLayer.useClasses = "[]" |
indices of class ids to be used for calculation of loss
Default: "[]"
Referenced by dicePixelCustomClassificationLayer(), and forwardLoss().