From 21d7b786022b888cab1175d286511949cd33b387 Mon Sep 17 00:00:00 2001 From: chengduo Date: Tue, 28 May 2019 21:31:28 +0800 Subject: [PATCH] update parallel_helper (#17691) test=develop --- python/paddle/fluid/dygraph/parallel_helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/dygraph/parallel_helper.py b/python/paddle/fluid/dygraph/parallel_helper.py index 7932c327e44..f378211de2b 100644 --- a/python/paddle/fluid/dygraph/parallel_helper.py +++ b/python/paddle/fluid/dygraph/parallel_helper.py @@ -13,7 +13,7 @@ # limitations under the License. import os from ..layers import collective - +from ..framework import Parameter __parallel_ctx__clz__ = None @@ -39,5 +39,5 @@ def _init_parallel_ctx(): def _broadcast_parameters(parameters): for param in parameters: - if param.trainable: + if isinstance(param, Parameter) and param.trainable: collective._broadcast(param, 0, sync_mode=True) -- GitLab