Skip to content

Commit

Permalink
Merge pull request #56 from Pr0Wh1teGivee/softmax_fix_rc41
Browse files Browse the repository at this point in the history
fix softmax_focal_loss_grad
  • Loading branch information
momo609 committed Aug 7, 2024
2 parents 6dd2b80 + 73fbb2a commit e39eb62
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mmcv/ops/csrc/pytorch/npu/focal_loss_npu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ void softmax_focal_loss_backward_npu(Tensor input, Tensor target, Tensor weight,
weight_y = at::sum(weight_y, 1, true);
weight_y = at::broadcast_to(weight_y, input.sizes());
}
grad_input_y = grad_input_y.fill_(0);
OpCommand cmd;
string reduction = "none";
cmd.Name("SoftmaxFocalLossGrad")
Expand Down

0 comments on commit e39eb62

Please sign in to comment.