Unverified Commit 120f70fe authored by Aditya Oke's avatar Aditya Oke Committed by GitHub
Browse files

adds docs for focal loss (#2979)

parent 1f4e3a46
......@@ -22,6 +22,7 @@ torchvision.ops
.. autofunction:: roi_pool
.. autofunction:: ps_roi_pool
.. autofunction:: deform_conv2d
.. autofunction:: sigmoid_focal_loss
.. autoclass:: RoIAlign
.. autoclass:: PSRoIAlign
......
......@@ -3,8 +3,8 @@ import torch.nn.functional as F
def sigmoid_focal_loss(
inputs,
targets,
inputs: torch.Tensor,
targets: torch.Tensor,
alpha: float = 0.25,
gamma: float = 2,
reduction: str = "none",
......@@ -12,7 +12,8 @@ def sigmoid_focal_loss(
"""
Original implementation from https://github.com/facebookresearch/fvcore/blob/master/fvcore/nn/focal_loss.py .
Loss used in RetinaNet for dense detection: https://arxiv.org/abs/1708.02002.
Args:
Arguments:
inputs: A float tensor of arbitrary shape.
The predictions for each example.
targets: A float tensor with the same shape as inputs. Stores the binary
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment