From 752f29a1d44a9f68763e73687eab4ea8dc6b14d7 Mon Sep 17 00:00:00 2001 From: idontkonwher <33867371+idontkonwher@users.noreply.github.com> Date: Mon, 21 Aug 2023 16:20:09 +0800 Subject: [PATCH] bug fix of operator "interp_linear" --- paddle/phi/kernels/gpu/interpolate_kernel.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/phi/kernels/gpu/interpolate_kernel.cu b/paddle/phi/kernels/gpu/interpolate_kernel.cu index 39274446cb9..73cb7576af6 100644 --- a/paddle/phi/kernels/gpu/interpolate_kernel.cu +++ b/paddle/phi/kernels/gpu/interpolate_kernel.cu @@ -90,7 +90,7 @@ __global__ void KeLinearInterpFw(const T* in, if (data_layout == DataLayout::kNCHW) { const T* in_pos = - &in[out_id_h * out_id_w + channel_id * in_img_size + in_img_idx]; + &in[out_id_h * input_w + channel_id * in_img_size + in_img_idx]; // linear interpolation out[out_id_h * output_w + out_id_w] = static_cast(w2lambda * static_cast(in_pos[0]) + -- GitLab