From 5c4f756f4254a76f62dc1f3e5350d7c87bb60dc1 Mon Sep 17 00:00:00 2001 From: haoyuying <35907364+haoyuying@users.noreply.github.com> Date: Wed, 13 Jan 2021 17:49:58 +0800 Subject: [PATCH] delete prepare_context --- paddlehub/finetune/trainer.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/paddlehub/finetune/trainer.py b/paddlehub/finetune/trainer.py index 38ccc67b..361dec52 100644 --- a/paddlehub/finetune/trainer.py +++ b/paddlehub/finetune/trainer.py @@ -81,8 +81,7 @@ class Trainer(object): if self.nranks > 1: paddle.distributed.init_parallel_env() - strategy = paddle.distributed.prepare_context() - self.model = paddle.DataParallel(self.model, strategy) + self.model = paddle.DataParallel(self.model) self.compare_metrics = self._compare_metrics if not compare_metrics else compare_metrics self._load_checkpoint() -- GitLab