Skip to content

Commit 300e019

Browse files
authored
[MLU] Fix bilinear interp grad bug (#1350)
1 parent be2eadb commit 300e019

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

backends/mlu/kernels/interpolate_kernel.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,8 +390,7 @@ void InterpolateGradKernel(
390390
const DataLayout data_layout = StringToDataLayout(data_layout_str);
391391
int n, c, in_d, in_h, in_w;
392392
ExtractNCDWH(x.dims(), data_layout, &n, &c, &in_d, &in_h, &in_w);
393-
int align_center = align_corners ? 0 : (align_mode == 0 ? 0 : 1);
394-
align_center = 0;
393+
int align_center = align_corners ? 0 : (align_mode == 1 ? 0 : 1);
395394

396395
float scale_h = -1;
397396
float scale_w = -1;

0 commit comments

Comments
 (0)