forked from huawei/mindspore2022
!10098 fix bug of pynative's mixprecision
From: @lianliguang Reviewed-by: @kisnwang,@zhoufeng54 Signed-off-by: @zhoufeng54
This commit is contained in:
commit
885f41549a
|
|
@ -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…
Reference in New Issue