提交 d34e9473 编写于 作者: W wuzewu

Fix dev_count error

上级 378dd335
......@@ -276,8 +276,13 @@ class BasicTask(object):
@property
def places(self):
if self.config.use_cuda:
return fluid.framework.cuda_places()
return fluid.framework.cpu_places()
_places = fluid.framework.cuda_places()
else:
_places = fluid.framework.cpu_places()
if not self.config.use_data_parallel:
return [_places[0]]
return _places
@property
def is_train_phase(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册