diff --git a/paddle/operators/prelu_op.cc b/paddle/operators/prelu_op.cc index 030f320ab9ed7b77583f3aee84562f29c7101076..eafd66579f1f58b6d2ce01c440aaed2db4812f0c 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 a1e719e3149c4fa9aa0df1b9923c133159dc8c66..a7e34744ba8cba9f2147bfda948f512fdc853f0e 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"));