Skip to content

Commit

Permalink
Merge pull request facebookresearch#1029 from Dorozhko-Anton/1013-sig…
Browse files Browse the repository at this point in the history
…moid_focal_loss_gamma_alpha

gamma, alpha are supposed to be floats, delete lines with [0] subscripts   facebookresearch#1013
  • Loading branch information
botcs authored Sep 16, 2019
2 parents 4d19749 + a393875 commit 03a5949
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions maskrcnn_benchmark/layers/sigmoid_focal_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ def backward(ctx, d_loss):

def sigmoid_focal_loss_cpu(logits, targets, gamma, alpha):
num_classes = logits.shape[1]
gamma = gamma[0]
alpha = alpha[0]
dtype = targets.dtype
device = targets.device
class_range = torch.arange(1, num_classes+1, dtype=dtype, device=device).unsqueeze(0)
Expand Down

0 comments on commit 03a5949

Please sign in to comment.