From 4409255c27548b9c3253a970c6553f0e77f2ab5d Mon Sep 17 00:00:00 2001 From: wanghaoshuang Date: Thu, 20 Jul 2017 10:38:06 +0800 Subject: [PATCH] fix code format --- paddle/function/CropOpGpu.cu | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/paddle/function/CropOpGpu.cu b/paddle/function/CropOpGpu.cu index 37ce6de0647..786eb268d45 100644 --- a/paddle/function/CropOpGpu.cu +++ b/paddle/function/CropOpGpu.cu @@ -36,10 +36,11 @@ __global__ void KeCrop(real* outputs, const real* inputs, template <> void Crop(real* outputs, const real* inputs, - const TensorShape inShape, - const TensorShape outShape, + const TensorShape inShape, + const TensorShape outShape, const FuncConfig& conf) { - std::vector crop_corner = conf.get>("crop_corner"); + std::vector crop_corner = + conf.get>("crop_corner"); int cropC = crop_corner[1]; int cropH = crop_corner[2]; int cropW = crop_corner[3]; @@ -74,7 +75,8 @@ __global__ void KeCropDiff(const real* inGrad, real* outGrad, const int c = (idx / inW / inH) % inC; const int n = idx / inW / inH / inC; - const int off = ((n * outC + c + cropC) * outH + h + cropH) * outW + cropW + w; + const int off = + ((n * outC + c + cropC) * outH + h + cropH) * outW + cropW + w; outGrad[off] += inGrad[idx]; } @@ -86,7 +88,8 @@ void CropGrad(const real* inGrad, const TensorShape inShape, const TensorShape outShape, const FuncConfig& conf) { - std::vector crop_corner = conf.get>("crop_corner"); + std::vector crop_corner = + conf.get>("crop_corner"); int cropC = crop_corner[1]; int cropH = crop_corner[2]; int cropW = crop_corner[3]; -- GitLab