Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GuoxiaWang committed Oct 12, 2021
1 parent c36eb75 commit 846a539
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/paddle/nn/layer/norm.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,10 @@ def __init__(self,
self._bias_attr = bias_attr
self._use_global_stats = use_global_stats

self._dtype = 'float32'
if get_default_dtype() == 'float16':
self._dtype = 'float32'
else:
self._dtype = get_default_dtype()

param_shape = [num_features]

Expand Down

1 comment on commit 846a539

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