Class MixPrecisionCfg

Class Documentation

class MixPrecisionCfg

Public Functions

inline MixPrecisionCfg()

Constructor of mix precision training config.

inline MixPrecisionCfg(const MixPrecisionCfg &rhs)

Constructor of mix precision training config.

参数

rhs[in] The config of mix precision.

~MixPrecisionCfg() = default

Destructor of mix precision config.

Public Members

bool dynamic_loss_scale_ = false

Enable/disable dynamic loss scale during mix precision training.

float loss_scale_

Initial loss scale factor.

bool keep_batchnorm_fp32_ = true

Keep batch norm in FP32 while training.

uint32_t num_of_not_nan_iter_th_

A threshold for modifying loss scale when dynamic loss scale is enabled.

bool is_raw_mix_precision_ = false

Is mix precision model export from mindspore.