From c6e04a5beb2a4ad22ed5239023335d178ea1e305 Mon Sep 17 00:00:00 2001 From: momo609 <963372609@qq.com> Date: Fri, 31 May 2024 10:43:13 +0800 Subject: [PATCH] fix bug. --- mmcv/ops/csrc/pytorch/npu/roi_pool_npu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmcv/ops/csrc/pytorch/npu/roi_pool_npu.cpp b/mmcv/ops/csrc/pytorch/npu/roi_pool_npu.cpp index 3d5498dff0..0e97247374 100644 --- a/mmcv/ops/csrc/pytorch/npu/roi_pool_npu.cpp +++ b/mmcv/ops/csrc/pytorch/npu/roi_pool_npu.cpp @@ -70,7 +70,7 @@ void roi_pool_backward_npu(Tensor grad_output, Tensor rois, Tensor argmax, .Attr("spatial_scale_w", spatial_scale) .Attr("pool_channel", pooled_channel) .Run(); - at::Tensor res = NpuUtils::format_contiguous(y); + at::Tensor res = y.contiguous(); grad_input.copy_(res); }