!10098 fix bug of pynative's mixprecision

From: @lianliguang
Reviewed-by: @kisnwang,@zhoufeng54
Signed-off-by: @zhoufeng54
This commit is contained in:
mindspore-ci-bot 2020-12-18 09:49:15 +08:00 committed by Gitee
commit 885f41549a
1 changed files with 1 additions and 1 deletions

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