focalLossLayer
The FocalLossLayer
object will be removed in a future release. Use
the trainnet
(Deep Learning Toolbox) function
and specify the loss as the focalCrossEntropy
function. For more information, see Version History.
Description
A focal loss layer predicts object classes using focal loss. Add the focal loss layer to train an object detection, semantic segmentation, or a classification network when imbalance exists between foreground and background classes. To compensate for class imbalance, the focal loss function multiplies the cross entropy function with a modulating factor that increases the sensitivity of the network to misclassified observations.
Creation
Description
creates a focal loss
layer for deep learning networks.layer
= focalLossLayer
sets properties of the focal loss layer by using one or more name-value pair arguments.
Enclose each property name in quotes.layer
= focalLossLayer(Name,Value
)
For example, focalLossLayer('Name','focalloss')
creates a focal
loss layer with the name 'focalloss'
and the specified balancing and
focusing parameters.
Properties
Examples
More About
References
[1] Lin, Tsung-Yi, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollar. "Focal Loss for Dense Object Detection." In 2017 IEEE® International Conference on Computer Vision (ICCV), 2999–3007. Venice: IEEE, 2017. https://doi.org/10.1109/ICCV.2017.324.
Extended Capabilities
Version History
Introduced in R2020aSee Also
dlnetwork
(Deep Learning Toolbox) | focalCrossEntropy
| trainnet
(Deep Learning Toolbox) | trainSSDObjectDetector
| semanticseg
| evaluateSemanticSegmentation
Topics
- Get Started with Object Detection Using Deep Learning
- Getting Started with SSD Multibox Detection
- List of Deep Learning Layers (Deep Learning Toolbox)
- Deep Learning in MATLAB (Deep Learning Toolbox)
- Specify Layers of Convolutional Neural Network (Deep Learning Toolbox)