diff --git a/paddle/framework/grad_op_creator.h b/paddle/framework/grad_op_creator.h index 441aae4979476e59267cecb842e23f6fece3e88f..456b066f1d00160dae33499fc3b4f09d23c60f09 100644 --- a/paddle/framework/grad_op_creator.h +++ b/paddle/framework/grad_op_creator.h @@ -8,6 +8,8 @@ namespace framework { class OpRegistry; class GradOpCreator { + using VarIndexMap = std::unordered_map; + public: GradOpCreator(const OperatorBase* op) : op_(op) {} OperatorBase* Create(); @@ -32,15 +34,15 @@ class GradOpCreator { }; OpInOutArg* BuildArg(const VarProto& var, const VarIndexMap& var_map, - const vector& format, InOutType type); + const std::vector& format, InOutType type); void BuildOpInOutArgList(); - void PushArgIntoGradOp(const OpInOutArg* arg, vector& in_out, - vector& format, VarIndexMap* varmap, int& idx, - bool is_grad); + void AddArgIntoGradOp(const OpInOutArg* arg, std::vector& in_out, + std::vector& format, VarIndexMap* varmap, int& idx, + bool is_grad); void CompleteGradOp(OperatorBase* grad_op) const; const OperatorBase* op_; std::vector> arg_list_; -} +}; } // namespace framework } // namespace paddle diff --git a/paddle/framework/op_registry.h b/paddle/framework/op_registry.h index fcb529bbac4908a61fa41bffc444aae09c60dad3..fffef31be34c170bd024b8f15ba4e6de7e167d38 100644 --- a/paddle/framework/op_registry.h +++ b/paddle/framework/op_registry.h @@ -6,7 +6,7 @@ #include #include #include "paddle/framework/attr_checker.h" -#include "paddle/framework/grad_op_creater.h" +#include "paddle/framework/grad_op_creator.h" #include "paddle/framework/op_desc.pb.h" #include "paddle/framework/scope.h"