提交 f0dd1201 编写于 作者: D dongdaxiang

fix destructor problem

test=develop
上级 f2bde9c2
......@@ -22,6 +22,8 @@ limitations under the License. */
namespace paddle {
namespace framework {
trainerMap g_trainer_map;
std::string TrainerFactory::TrainerTypeList() {
std::string trainer_types;
for (auto iter = g_trainer_map.begin(); iter != g_trainer_map.end(); ++iter) {
......
......@@ -22,7 +22,7 @@ namespace paddle {
namespace framework {
typedef std::shared_ptr<TrainerBase> (*CreatetrainerFunction)();
typedef std::unordered_map<std::string, CreatetrainerFunction> trainerMap;
trainerMap g_trainer_map;
extern trainerMap g_trainer_map;
#define REGISTER_TRAINER_CLASS(trainer_class) \
namespace { \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册