fix bug of pynative mixedprecision

pull/10098/head
LianLiguang 4 years ago
parent 3f9e90a0a8
commit 168fd6c9b2

@ -644,7 +644,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