diff --git a/paddle/phi/kernels/gpu/interpolate_kernel.cu b/paddle/phi/kernels/gpu/interpolate_kernel.cu index 39274446cb9ac69363c62e466d3bbcbd947e8554..73cb7576af67d20ce6674f2102c4f35b9c5fb006 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]) +