From 8a5ee462a53f7a59edd9dbc5388a60cfab7c1e99 Mon Sep 17 00:00:00 2001 From: fengjiayi Date: Thu, 20 Jul 2017 10:59:16 +0800 Subject: [PATCH] Fix some compile errors --- paddle/framework/grad_op_creator.h | 12 +++++++----- paddle/framework/op_registry.h | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/paddle/framework/grad_op_creator.h b/paddle/framework/grad_op_creator.h index 441aae4979..456b066f1d 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 fcb529bbac..fffef31be3 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" -- GitLab