Unverified Commit bfdd1f9c authored by sherie's avatar sherie Committed by GitHub
Browse files

[Fix] Fix boxes.scalar_type in nms_npu (#2731)

parent bc727f71
Pipeline #205 failed with stages
in 0 seconds
...@@ -4,7 +4,7 @@ using namespace NPU_NAME_SPACE; ...@@ -4,7 +4,7 @@ using namespace NPU_NAME_SPACE;
using namespace std; using namespace std;
Tensor nms_npu(Tensor boxes, Tensor scores, float iou_threshold, int offset) { Tensor nms_npu(Tensor boxes, Tensor scores, float iou_threshold, int offset) {
TORCH_CHECK((boxes.scalar_type == at::ScalarType::Float), TORCH_CHECK((boxes.scalar_type() == at::ScalarType::Float),
"The type of boxes tensor passed in nms_npu should be float"); "The type of boxes tensor passed in nms_npu should be float");
int64_t offset_64 = offset; int64_t offset_64 = offset;
at::Tensor iou_threshold_y = at_npu::native::OpPreparation::ApplyTensor( at::Tensor iou_threshold_y = at_npu::native::OpPreparation::ApplyTensor(
......
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