diff --git a/paddle/fluid/operators/grid_sampler_op.h b/paddle/fluid/operators/grid_sampler_op.h index e88da83e4a087662d2e7ef0e3108215bca8ec74f..00fba457bbacde0ec9d02d2a5688e3976088c829 100644 --- a/paddle/fluid/operators/grid_sampler_op.h +++ b/paddle/fluid/operators/grid_sampler_op.h @@ -66,9 +66,11 @@ static void CalcGridLocations(const platform::CPUDeviceContext& ctx, Tensor half_xmax; Tensor half_ymax; half_xmax.mutable_data({n, h, w}, ctx.GetPlace()); - auto half_xmax_t = EigenTensor::From(half_xmax).setConstant(0.5 * x_max); + auto half_xmax_t = + EigenTensor::From(half_xmax).setConstant(0.5 * x_max); half_ymax.mutable_data({n, h, w}, ctx.GetPlace()); - auto half_ymax_t = EigenTensor::From(half_ymax).setConstant(0.5 * y_max); + auto half_ymax_t = + EigenTensor::From(half_ymax).setConstant(0.5 * y_max); // scale grid to [0, h-1/w-1] auto grid_x_t = EigenTensor::From(grid_x);