diff --git a/python/paddle/fluid/dygraph/parallel_helper.py b/python/paddle/fluid/dygraph/parallel_helper.py index 7932c327e44eea80d195fa77e56ee596fec2c6d1..f378211de2b8a1579ab139318cdc3cb8d5bdc2de 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)