Skip to content

Commit

Permalink
fix nms_rotated
Browse files Browse the repository at this point in the history
  • Loading branch information
momo609 committed Sep 26, 2023
1 parent d7a02e3 commit e5a3726
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mmcv/ops/csrc/pytorch/npu/focal_loss_npu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ void sigmoid_focal_loss_backward_npu(Tensor input, Tensor target, Tensor weight,
int64_t weight_size = weight.size(0);
at::Tensor weight_y = at::ones_like(input);
if (weight_size > 0) {
weight_y = at_npu::native::NPUNativeFunctions::npu_broadcast(weight,
input.sizes());
weight_y = at::broadcast_to(weight, input.sizes());
}
OpCommand cmd;
string reduction = "none";
Expand Down

0 comments on commit e5a3726

Please sign in to comment.