From 9b8ca0cfa8398a9479b54a0797e3fee4b0724158 Mon Sep 17 00:00:00 2001 From: dzhwinter Date: Wed, 18 Apr 2018 08:39:55 -0700 Subject: [PATCH] "fix after merge" --- paddle/fluid/operators/activation_op.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/paddle/fluid/operators/activation_op.cc b/paddle/fluid/operators/activation_op.cc index 36c479b4018..549629ffd66 100644 --- a/paddle/fluid/operators/activation_op.cc +++ b/paddle/fluid/operators/activation_op.cc @@ -32,7 +32,7 @@ namespace operators { .SetDefault(false); \ AddComment(#OP_COMMENT); \ } \ - }; + } #define REGISTER_ACTIVATION_OP_GRAD_MAKER(OP_NAME, KERNEL_TYPE) \ class OP_NAME##GradMaker \ @@ -53,7 +53,7 @@ namespace operators { op->SetOutput(::paddle::framework::GradVarName("X"), InputGrad("X")); \ return std::unique_ptr<::paddle::framework::OpDesc>(op); \ } \ - }; + } class ActivationOp : public framework::OperatorWithKernel { public: @@ -509,9 +509,11 @@ namespace ops = paddle::operators; ::paddle::operators::OP_NAME##GradMaker); \ REGISTER_OPERATOR(KERNEL_TYPE##_grad, ::paddle::operators::ActivationOpGrad) -#define REGISTER_ACTIVATION_OP(OP_NAME, KERNEL_TYPE) \ - REGISTER_OP(KERNEL_TYPE, ops::ActivationOp, ops::OP_NAME##OpMaker, \ - KERNEL_TYPE##_grad, ops::ActivationOpGrad); +#define REGISTER_ACTIVATION_OP(OP_NAME, KERNEL_TYPE) \ + REGISTER_OPERATOR(KERNEL_TYPE, ::paddle::operators::ActivationOp, \ + ::paddle::operators::OP_NAME##OpMaker, \ + ::paddle::framework::DefaultGradOpDescMaker); \ + REGISTER_OPERATOR(KERNEL_TYPE##_grad, ::paddle::operators::ActivationOpGrad) #define REGISTER_ACTIVATION_CPU_KERNEL(act_type, functor, grad_functor) \ REGISTER_OP_CPU_KERNEL( \ -- GitLab