update parallel_helper (#17691)

test=develop
dependabot/pip/python/requests-2.20.0
chengduo 6 years ago committed by GitHub
parent 7a401da52f
commit 21d7b78602
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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)

Loading…
Cancel
Save