From 0cb121cf1caa97dff49349c72ac11638133007d9 Mon Sep 17 00:00:00 2001 From: 123malin Date: Wed, 26 Feb 2020 14:48:00 +0800 Subject: [PATCH] test=develop, bug fix for trainer_factory (#22751) --- python/paddle/fluid/trainer_factory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/fluid/trainer_factory.py b/python/paddle/fluid/trainer_factory.py index c28e961cd77..0e071251bb2 100644 --- a/python/paddle/fluid/trainer_factory.py +++ b/python/paddle/fluid/trainer_factory.py @@ -43,7 +43,7 @@ class TrainerFactory(object): def _create_trainer(self, opt_info=None): trainer = None device_worker = None - if opt_info == None: + if not opt_info: # default is MultiTrainer + Hogwild trainer = MultiTrainer() device_worker = Hogwild() -- GitLab