Simplified Retrain Configuration File
Table 3-37 describes the parameters in the retrain_config.proto file.
Message |
Required/Optional |
Type |
Field |
Description |
---|---|---|---|---|
AMCTRetrainConfig |
- |
- |
- |
Simplified AMCT retrain configuration. |
Required |
RetrainDataQuantConfig |
retrain_data_quant_config |
Data retrain configuration. |
|
Required |
RetrainWeightQuantConfig |
retrain_weight_quant_config |
Weight retrain configuration. |
|
Repeated |
string |
skip_layers |
Layers to skip during retrain. |
|
Repeated |
RetrainOverrideLayer |
override_layer_configs |
Layer to override. |
|
Repeated |
string |
skip_layer_types |
Types of layers to skip during retrain. This parameter is not supported in the current version. |
|
Repeated |
RetrainOverrideLayerType |
override_layer_types |
Types of layers to override. |
|
RetrainDataQuantConfig |
- |
- |
- |
Data retrain configuration. |
- |
ULQuantize |
ulq_quantize |
Data quantization algorithm. Only ULQ is supported in the current version. |
|
ULQuantize |
- |
- |
- |
ULQ algorithm configuration. |
Optional |
ClipMaxMin |
clip_max_min |
Initial upper and lower limits. If not specified, IFMR is used for initialization. |
|
Optional |
bool |
fixed_min |
Whether to fix the lower limit at 0. Set to true for ReLU or false for other algorithms. |
|
ClipMaxMin |
- |
- |
- |
Initial upper and lower limits. |
Required |
float |
clip_max |
Initial upper limit. |
|
Required |
float |
clip_min |
Initial lower limit. |
|
RetrainWeightQuantConfig |
- |
- |
- |
Weight retrain configuration. |
- |
ARQRetrain |
arq_retrain |
Weight quantization algorithm. Only ARQ is supported in the current version. |
|
ARQRetrain |
- |
- |
- |
ARQ algorithm configuration. |
Required |
bool |
channel_wise |
Channel-wise ARQ enable. |
|
RetrainOverrideLayer |
- |
- |
- |
Layer overriding configuration. |
Required |
string |
layer_name |
Layer name. |
|
Required |
RetrainDataQuantConfig |
retrain_data_quant_config |
Data quantization configuration to apply. |
|
Required |
RetrainWeightQuantConfig |
retrain_weight_quant_config |
Weight quantization configuration to apply. |
|
RetrainOverrideLayerType |
- |
- |
- |
Type of layers to override. |
Required |
string |
layer_type |
Layer type. |
|
Required |
RetrainDataQuantConfig |
retrain_data_quant_config |
Data quantization configuration to apply. |
|
Required |
RetrainWeightQuantConfig |
retrain_weight_quant_config |
Weight quantization configuration to apply. |
The following is an example simplified retrain configuration file (quant.cfg):
# global quantize parameter retrain_data_quant_config: { ulq_quantize: { clip_max_min: { clip_max: 6.0 clip_min: -6.0 } } } retrain_weight_quant_config: { arq_retrain: { channel_wise: true } } override_layer_types : { layer_type: "InnerProduct" retrain_weight_quant_config: { arq_retrain: { channel_wise: false } } } override_layer_configs : { layer_name: "fc_5" retrain_weight_quant_config: { arq_retrain: { channel_wise: false } } }