From 09c65b6d4fc3e5e9106c7b3fefc1d04c2c99596b Mon Sep 17 00:00:00 2001 From: hedaoyuan Date: Mon, 18 Sep 2017 00:02:34 +0800 Subject: [PATCH] Follow comments. --- paddle/operators/{conv_op.cc => conv2d_op.cc} | 8 ++++---- paddle/operators/{conv_op.cu => conv2d_op.cu} | 8 ++++---- paddle/operators/{gemm_conv_op.h => gemm_conv2d_op.h} | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) rename paddle/operators/{conv_op.cc => conv2d_op.cc} (95%) rename paddle/operators/{conv_op.cu => conv2d_op.cu} (76%) rename paddle/operators/{gemm_conv_op.h => gemm_conv2d_op.h} (98%) diff --git a/paddle/operators/conv_op.cc b/paddle/operators/conv2d_op.cc similarity index 95% rename from paddle/operators/conv_op.cc rename to paddle/operators/conv2d_op.cc index 934f153e727..b74b42546db 100644 --- a/paddle/operators/conv_op.cc +++ b/paddle/operators/conv2d_op.cc @@ -12,7 +12,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -#include "paddle/operators/gemm_conv_op.h" +#include "paddle/operators/gemm_conv2d_op.h" namespace paddle { namespace operators { @@ -116,7 +116,7 @@ namespace ops = paddle::operators; REGISTER_OP(conv2d, ops::Conv2DOp, ops::Conv2DOpMaker, conv2d_grad, ops::Conv2DOpGrad); -REGISTER_OP_CPU_KERNEL(conv2d, - ops::GemmConvKernel); REGISTER_OP_CPU_KERNEL( - conv2d_grad, ops::GemmConvGradKernel); + conv2d, ops::GemmConv2dKernel); +REGISTER_OP_CPU_KERNEL( + conv2d_grad, ops::GemmConvGrad2dKernel); diff --git a/paddle/operators/conv_op.cu b/paddle/operators/conv2d_op.cu similarity index 76% rename from paddle/operators/conv_op.cu rename to paddle/operators/conv2d_op.cu index a15adecda46..7666f4c4c12 100644 --- a/paddle/operators/conv_op.cu +++ b/paddle/operators/conv2d_op.cu @@ -12,11 +12,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -#include "paddle/operators/gemm_conv_op.h" +#include "paddle/operators/gemm_conv2d_op.h" namespace ops = paddle::operators; -REGISTER_OP_GPU_KERNEL(conv2d, - ops::GemmConvKernel); REGISTER_OP_GPU_KERNEL( - conv2d_grad, ops::GemmConvGradKernel); + conv2d, ops::GemmConv2dKernel); +REGISTER_OP_GPU_KERNEL( + conv2d_grad, ops::GemmConvGrad2dKernel); diff --git a/paddle/operators/gemm_conv_op.h b/paddle/operators/gemm_conv2d_op.h similarity index 98% rename from paddle/operators/gemm_conv_op.h rename to paddle/operators/gemm_conv2d_op.h index b125698c6de..71bf09bb7e7 100644 --- a/paddle/operators/gemm_conv_op.h +++ b/paddle/operators/gemm_conv2d_op.h @@ -25,7 +25,7 @@ namespace operators { using Tensor = framework::Tensor; template -class GemmConvKernel : public framework::OpKernel { +class GemmConv2dKernel : public framework::OpKernel { public: void Compute(const framework::ExecutionContext& context) const override { const Tensor* input = context.Input("Input"); @@ -101,7 +101,7 @@ class GemmConvKernel : public framework::OpKernel { }; template -class GemmConvGradKernel : public framework::OpKernel { +class GemmConvGrad2dKernel : public framework::OpKernel { public: void Compute(const framework::ExecutionContext& context) const override { const Tensor* input = context.Input("Input"); -- GitLab