From 1721613f1ec1ba83b8df6cb140bea060bc667642 Mon Sep 17 00:00:00 2001 From: chenweihang Date: Mon, 9 Jul 2018 07:06:22 +0000 Subject: [PATCH] simplify construct function --- paddle/fluid/operators/squeeze_op.cc | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/paddle/fluid/operators/squeeze_op.cc b/paddle/fluid/operators/squeeze_op.cc index 55068e84d..7c07cfdb7 100644 --- a/paddle/fluid/operators/squeeze_op.cc +++ b/paddle/fluid/operators/squeeze_op.cc @@ -96,10 +96,7 @@ class SqueezeOpInferShape : public framework::InferShapeBase { class SqueezeOp : public framework::OperatorBase { public: - SqueezeOp(const std::string &type, const framework::VariableNameMap &inputs, - const framework::VariableNameMap &outputs, - const framework::AttributeMap &attrs) - : OperatorBase(type, inputs, outputs, attrs) {} + using OperatorBase::OperatorBase; private: void RunImpl(const framework::Scope &scope, @@ -171,11 +168,7 @@ class SqueezeGradInferShape : public framework::InferShapeBase { class SqueezeGradOp : public framework::OperatorBase { public: - SqueezeGradOp(const std::string &type, - const framework::VariableNameMap &inputs, - const framework::VariableNameMap &outputs, - const framework::AttributeMap &attrs) - : OperatorBase(type, inputs, outputs, attrs) {} + using OperatorBase::OperatorBase; private: void RunImpl(const framework::Scope &scope, -- GitLab