From bb8ea1637db6bf28afe7c5c0371b0667e4f35a17 Mon Sep 17 00:00:00 2001 From: zhoukunsheng Date: Fri, 12 Apr 2019 16:36:12 +0800 Subject: [PATCH] fix 16823: delete default_grad register for reduce_all, reduce_any --- paddle/fluid/op_use_default_grad_op_maker.spec | 2 -- paddle/fluid/operators/reduce_ops/reduce_op.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/paddle/fluid/op_use_default_grad_op_maker.spec b/paddle/fluid/op_use_default_grad_op_maker.spec index 63eaa676a43..21a25ce7d5e 100644 --- a/paddle/fluid/op_use_default_grad_op_maker.spec +++ b/paddle/fluid/op_use_default_grad_op_maker.spec @@ -29,8 +29,6 @@ pool3d prelu quantize rank_loss -reduce_all -reduce_any reduce_max reduce_mean reduce_min diff --git a/paddle/fluid/operators/reduce_ops/reduce_op.h b/paddle/fluid/operators/reduce_ops/reduce_op.h index 81e9933276c..c86591fdafa 100644 --- a/paddle/fluid/operators/reduce_ops/reduce_op.h +++ b/paddle/fluid/operators/reduce_ops/reduce_op.h @@ -278,4 +278,4 @@ namespace ops = paddle::operators; virtual std::string GetOpType() const { return "Reduce " #op_name; } \ }; \ REGISTER_OPERATOR(op_name, ops::ReduceOp, __##op_name##Maker__, \ - paddle::framework::DefaultGradOpDescMaker); + paddle::framework::EmptyGradOpMaker); -- GitLab