From 197c82f30faf0f24c958a8b0ca902e9d08582194 Mon Sep 17 00:00:00 2001 From: fengjiayi Date: Mon, 24 Jul 2017 22:02:45 +0800 Subject: [PATCH] Rewrite grad_op registry macro of mul, sigmoid and softmax --- paddle/operators/mul_op.cc | 2 +- paddle/operators/sigmoid_op.cc | 2 +- paddle/operators/softmax_op.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/paddle/operators/mul_op.cc b/paddle/operators/mul_op.cc index 89e0375a7a..cd74c8b976 100644 --- a/paddle/operators/mul_op.cc +++ b/paddle/operators/mul_op.cc @@ -67,7 +67,7 @@ protected: } // namespace paddle REGISTER_OP(mul, paddle::operators::MulOp, paddle::operators::MulOpMaker); -REGISTER_GRADIENT_OP(mul, paddle::operators::MulOpGrad); +REGISTER_GRADIENT_OP(mul, mul_grad, paddle::operators::MulOpGrad); REGISTER_OP_CPU_KERNEL( mul, paddle::operators::MulKernel); diff --git a/paddle/operators/sigmoid_op.cc b/paddle/operators/sigmoid_op.cc index 7dc58bbb10..bf63af28b0 100644 --- a/paddle/operators/sigmoid_op.cc +++ b/paddle/operators/sigmoid_op.cc @@ -56,7 +56,7 @@ protected: REGISTER_OP(sigmoid, paddle::operators::SigmoidOp, paddle::operators::SigmoidOpMaker); -REGISTER_GRADIENT_OP(sigmoid, paddle::operators::SigmoidOpGrad); +REGISTER_GRADIENT_OP(sigmoid, sigmoid_grad, paddle::operators::SigmoidOpGrad); REGISTER_OP_CPU_KERNEL( sigmoid, diff --git a/paddle/operators/softmax_op.cc b/paddle/operators/softmax_op.cc index 1d10a415d0..82f72fa19f 100644 --- a/paddle/operators/softmax_op.cc +++ b/paddle/operators/softmax_op.cc @@ -59,6 +59,6 @@ protected: namespace ops = paddle::operators; REGISTER_OP(softmax, ops::SoftmaxOp, ops::SoftmaxOpMaker); -REGISTER_GRADIENT_OP(softmax, paddle::operators::SoftmaxOpGrad); +REGISTER_GRADIENT_OP(softmax, softmax_grad, paddle::operators::SoftmaxOpGrad); REGISTER_OP_CPU_KERNEL(softmax, ops::SoftmaxKernel); -- GitLab