From c7dfec11ef4cceaf3667fbb3e5ed3d8eca1d25bc Mon Sep 17 00:00:00 2001 From: zchen0211 Date: Fri, 15 Sep 2017 12:01:16 -0700 Subject: [PATCH] fix --- paddle/operators/prelu_op.cc | 20 ++++++++++---------- paddle/operators/prelu_op.h | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/paddle/operators/prelu_op.cc b/paddle/operators/prelu_op.cc index 030f320ab9e..eafd66579f1 100644 --- a/paddle/operators/prelu_op.cc +++ b/paddle/operators/prelu_op.cc @@ -18,9 +18,9 @@ namespace paddle { namespace operators { -class PreluOp : public framework::OperatorWithKernel { +class PReluOp : public framework::OperatorWithKernel { public: - PreluOp(const std::string &type, const framework::VariableNameMap &inputs, + PReluOp(const std::string &type, const framework::VariableNameMap &inputs, const framework::VariableNameMap &outputs, const framework::AttributeMap &attrs) : OperatorWithKernel(type, inputs, outputs, attrs) {} @@ -34,13 +34,13 @@ class PreluOp : public framework::OperatorWithKernel { }; // template -class PreluOpMaker : public framework::OpProtoAndCheckerMaker { +class PReluOpMaker : public framework::OpProtoAndCheckerMaker { public: - PreluOpMaker(framework::OpProto *proto, framework::OpAttrChecker *op_checker) + PReluOpMaker(framework::OpProto *proto, framework::OpAttrChecker *op_checker) : OpProtoAndCheckerMaker(proto, op_checker) { AddInput("X", "The input tensor of prelu operator."); AddOutput("Out", "The output tensor of prelu operator."); - AddComment(R"DOC(Prelu operator + AddComment(R"DOC(PRelu operator The equation is: f(x) = alpha * x , for x < 0 @@ -52,7 +52,7 @@ f(x) = x , for x >= 0 }; // The operator to calculate gradients of a prelu operator. -class PreluGradOp : public framework::OperatorWithKernel { +class PReluGradOp : public framework::OperatorWithKernel { public: using framework::OperatorWithKernel::OperatorWithKernel; @@ -72,9 +72,9 @@ class PreluGradOp : public framework::OperatorWithKernel { namespace ops = paddle::operators; -REGISTER_OP(prelu, ops::PreluOp, ops::PreluOpMaker, prelu_grad, - ops::PreluGradOp); +REGISTER_OP(prelu, ops::PReluOp, ops::PReluOpMaker, prelu_grad, + ops::PReluGradOp); REGISTER_OP_CPU_KERNEL(prelu, - ops::PreluKernel); + ops::PReluKernel); REGISTER_OP_CPU_KERNEL(prelu_grad, - ops::PreluGradKernel); + ops::PReluGradKernel); diff --git a/paddle/operators/prelu_op.h b/paddle/operators/prelu_op.h index a1e719e3149..a7e34744ba8 100644 --- a/paddle/operators/prelu_op.h +++ b/paddle/operators/prelu_op.h @@ -25,7 +25,7 @@ template ; template -class PreluKernel : public framework::OpKernel { +class PReluKernel : public framework::OpKernel { public: void Compute(const framework::ExecutionContext& context) const override { auto* X = context.Input("X"); @@ -45,7 +45,7 @@ class PreluKernel : public framework::OpKernel { }; template -class PreluGradKernel : public framework::OpKernel { +class PReluGradKernel : public framework::OpKernel { public: void Compute(const framework::ExecutionContext& context) const override { auto* dX = context.Output(framework::GradVarName("X")); -- GitLab