Browse Source

!10098 fix bug of pynative's mixprecision

From: @lianliguang
Reviewed-by: @kisnwang,@zhoufeng54
Signed-off-by: @zhoufeng54
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
885f41549a
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      mindspore/nn/cell.py

+ 1
- 1
mindspore/nn/cell.py View File

@@ -647,7 +647,7 @@ class Cell(Cell_):
param.set_cast_dtype(mstype.float32)
elif self._mindspore_flags.get('fp16'):
param.set_cast_dtype(mstype.float16)
else:
elif hasattr(param, "set_cast_dtype"):
# retest dtype
param.set_cast_dtype()
return param


Loading…
Cancel
Save