diff --git a/paddle/framework/op_registry.h b/paddle/framework/op_registry.h index b5b4668074cc79511f9b5e9bb462701360621ba1..c0654b375dd09d7e4e06a5a46ee4bd6be9c5f82b 100644 --- a/paddle/framework/op_registry.h +++ b/paddle/framework/op_registry.h @@ -274,7 +274,7 @@ class OpKernelRegistrar : public Registrar { class _OpClass_##op_type##_ : public op_class { \ public: \ DEFINE_OP_CLONE_METHOD(_OpClass_##op_type##_); \ - DEFINE_OP_CTOR(_OpClass_##op_type##_, op_class); \ + DEFINE_OP_CONSTRUCTOR(_OpClass_##op_type##_, op_class); \ }; \ static ::paddle::framework::OpRegistrar<_OpClass_##op_type##_, \ op_maker_class> \ @@ -294,7 +294,7 @@ class OpKernelRegistrar : public Registrar { class _OpGradClass_##op_type##_ : public grad_op_class { \ public: \ DEFINE_OP_CLONE_METHOD(_OpGradClass_##op_type##_); \ - DEFINE_OP_CTOR(_OpGradClass_##op_type##_, grad_op_class); \ + DEFINE_OP_CONSTRUCTOR(_OpGradClass_##op_type##_, grad_op_class); \ }; \ static ::paddle::framework::GradOpRegistrar<_OpGradClass_##op_type##_> \ __op_gradient_registrar_##op_type##_##grad_op_type##__(#op_type, \ diff --git a/paddle/framework/operator.h b/paddle/framework/operator.h index 9e4d0d5e398d74c9a22b1f9fa70860190b6c5d49..4a1dee6fb00d778799865a0199cffcb41ce0aaef 100644 --- a/paddle/framework/operator.h +++ b/paddle/framework/operator.h @@ -118,7 +118,7 @@ class OperatorBase { public: std::string type_; // NOTE: in case of OpGrad, inputs_ contains: - // I (Inputs) + // I (Inputs)opear // O (Outputs) // OG (Output Gradients) VarNameMap inputs_; @@ -139,7 +139,7 @@ class OperatorBase { // You can also use // using PARENT_CLASS::PARENT_CLASS; // to use parent's constructor. -#define DEFINE_OP_CTOR(CLS, PARENT_CLS) \ +#define DEFINE_OP_CONSTRUCTOR(CLS, PARENT_CLS) \ CLS(const std::string& type, const VarNameMap& inputs, \ const VarNameMap& outputs, const paddle::framework::AttributeMap& attrs) \ : PARENT_CLS(type, inputs, outputs, attrs) {}