megengine.amp.low_prec_dtype#

low_prec_dtype = <property object>#

获取或设置 amp autocast 模式的低精度 dtype。 它将更改 Tensor 转换的目标 dtype 以获得更好的速度和内存。 默认值:float16

实际案例

import megengine as mge
mge.amp.low_prec_dtype = "float16"