From ec84ac32ec43294c18414033695cd1773b44d714 Mon Sep 17 00:00:00 2001 From: wanghaoshuang Date: Fri, 22 Oct 2021 06:26:05 +0000 Subject: [PATCH] Fix code format --- paddle/fluid/operators/grid_sampler_op.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/operators/grid_sampler_op.h b/paddle/fluid/operators/grid_sampler_op.h index d8556f3a7bb2e..da386052c7dc0 100644 --- a/paddle/fluid/operators/grid_sampler_op.h +++ b/paddle/fluid/operators/grid_sampler_op.h @@ -83,7 +83,7 @@ static inline void clip(const platform::CPUDeviceContext& ctx, auto extra = grid_abs - (grid_abs / double_range).floor() * double_range; grid_slice_t.device(place) = extra.cwiseMin(double_range - extra); if (max_val == 0) { - grid_slice_t.device(place) = grid_slice_t.constant(static_cast(0)); + grid_slice_t.device(place) = grid_slice_t.constant(static_cast(0)); } } else { auto double_range = static_cast((max_val + 1) * 2); @@ -132,7 +132,7 @@ static inline void clipWithMask(const platform::CPUDeviceContext& ctx, (is_neg != one_more_flip).template cast()); grid_slice_t.device(place) = extra.cwiseMin(double_range - extra); if (max_val == 0) { - grid_slice_t.device(place) = grid_slice_t.constant(static_cast(0)); + grid_slice_t.device(place) = grid_slice_t.constant(static_cast(0)); } } else { auto double_range = static_cast((max_val + 1) * 2);