Skip to content

Commit

Permalink
fix sync_bn error in fp16 amp-o2
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangbo9674 committed Mar 25, 2022
1 parent be5918e commit c2e23dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/paddle/fluid/dygraph/amp/auto_cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def pure_fp16_initialize(models):
if (layer._dtype == 'float16') or isinstance(
layer, (paddle.nn.BatchNorm, paddle.nn.BatchNorm1D,
paddle.nn.BatchNorm2D, paddle.nn.BatchNorm3D,
paddle.nn.LayerNorm)):
paddle.nn.LayerNorm, paddle.nn.SyncBatchNorm)):
continue
layer._to_impl(dtype='float16', include_sublayers=False)
return models
Expand Down

1 comment on commit c2e23dd

@paddle-bot-old
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulation! Your pull request passed all required CI. You could ask reviewer(s) to approve and merge. 🎉

Please sign in to comment.