ExperimentalConfig Constructor
Description
Constructs an object of the ExperimentalConfig class. This constructor is an extended option for debugging and may be changed in later versions. Therefore, it cannot be used in commercial products.
Prototype
def __init__(self, accelerate_train_mode=="fast|step|0.9", ...... )
Options
Option |
Input/Output |
Description |
|---|---|---|
accelerate_train_mode |
Input |
If training takes more than one hour, you can trigger training acceleration to improve training performance by configuring this option. The software compiles and runs the corresponding proportion of training processes with reduced precision based on the acceleration type, mode of triggering acceleration, and proportion of low-precision training processes of your configurations. The remaining training processes are compiled and run based on the original precision. The value type of this option is a string. Three fields are separated by vertical bars (|), for example, fast|step|0.9.
Example:
Notes:
|
Returns
An object of the ExperimentalConfig class, as an argument passed to the NPURunConfig call.
Restrictions
None
Examples
1 2 3 4 5 6 | from npu_bridge.npu_init import * from npu_bridge.estimator.npu.npu_config import ExperimentalConfig ... experimental_config=ExperimentalConfig(accelerate_train_mode="fast|step|0.9") session_config=tf.ConfigProto(allow_soft_placement=True) config = NPURunConfig(experimental_config=experimental_config, session_config=session_config) |