Create focal loss layer using focal loss function for object detection
A focal loss layer predicts object classes using focal loss. Focal loss is useful for object detection 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.
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(2,0.1,'Name','focalloss')
creates a
focal loss layer with the name 'focalloss'
and the specified balancing
and focusing parameters.
[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.
trainNetwork
| trainSSDObjectDetector