未验证 提交 5c4f756f 编写于 作者: H haoyuying 提交者: GitHub

delete prepare_context

上级 08cb2a73
...@@ -81,8 +81,7 @@ class Trainer(object): ...@@ -81,8 +81,7 @@ class Trainer(object):
if self.nranks > 1: if self.nranks > 1:
paddle.distributed.init_parallel_env() paddle.distributed.init_parallel_env()
strategy = paddle.distributed.prepare_context() self.model = paddle.DataParallel(self.model)
self.model = paddle.DataParallel(self.model, strategy)
self.compare_metrics = self._compare_metrics if not compare_metrics else compare_metrics self.compare_metrics = self._compare_metrics if not compare_metrics else compare_metrics
self._load_checkpoint() self._load_checkpoint()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册