Mod Configuration#
|
Mobilint SDK qb Compiler v0.12.0.0
MCS002-KR
|
Minimum Output Difference configuration definitions used by Mobilint compiler for model quantization. More...
Classes | |
| class | qubee.configs.mod_config.ModConfig |
| Configuration for Minimum Output Difference algorithm. More... | |
Functions | |
| qubee.configs.mod_config.ModConfig.__init__ (self, bool apply, int epochs, int warmup_epochs, numbers.Number lr_act_scale, numbers.Number lr_zeropoint, numbers.Number lr_weight_scale, numbers.Number lr_weight, numbers.Number lr_bias, numbers.Number lr_min_ratio, int batch_size, numbers.Number q_drop, bool quantize_weight, str weight_scale_init, str downresol_mode, str post_processing, numbers.Number box_conf_thres, numbers.Number box_iou_thres, str loss_type, bool use_outputs, numbers.Number kl_temperature, numbers.Number recon_prob, numbers.Number recon_coeff, numbers.Number lambda_0, numbers.Number lambda_1, numbers.Number lambda_2, List anchors, bool use_xyxy, str save_dir, int seed, List[str] apply_layers, List[str] exclude_layers, bool optional=optional) | |
| Initialize the ModConfig. | |
| qubee.configs.mod_config.ModConfig.default_config (cls) | |
| qubee.configs.mod_config.ModConfig.from_dict (cls, dict config_dict) | |
| Create ModConfig from dictionary (JSON structure) | |
| qubee.configs.mod_config.ModConfig.to_dict (self) | |
| ModConfig | qubee.configs.mod_config.get_mod_config (**kwargs) |
| Create ModConfig with partial parameters merged with defaults. | |
Detailed Description
Minimum Output Difference configuration definitions used by Mobilint compiler for model quantization.
Function Documentation
◆ __init__()
| qubee.configs.mod_config.ModConfig.__init__ | ( | self, | |
| bool | apply, | ||
| int | epochs, | ||
| int | warmup_epochs, | ||
| numbers.Number | lr_act_scale, | ||
| numbers.Number | lr_zeropoint, | ||
| numbers.Number | lr_weight_scale, | ||
| numbers.Number | lr_weight, | ||
| numbers.Number | lr_bias, | ||
| numbers.Number | lr_min_ratio, | ||
| int | batch_size, | ||
| numbers.Number | q_drop, | ||
| bool | quantize_weight, | ||
| str | weight_scale_init, | ||
| str | downresol_mode, | ||
| str | post_processing, | ||
| numbers.Number | box_conf_thres, | ||
| numbers.Number | box_iou_thres, | ||
| str | loss_type, | ||
| bool | use_outputs, | ||
| numbers.Number | kl_temperature, | ||
| numbers.Number | recon_prob, | ||
| numbers.Number | recon_coeff, | ||
| numbers.Number | lambda_0, | ||
| numbers.Number | lambda_1, | ||
| numbers.Number | lambda_2, | ||
| List | anchors, | ||
| bool | use_xyxy, | ||
| str | save_dir, | ||
| int | seed, | ||
| List[str] | apply_layers, | ||
| List[str] | exclude_layers, | ||
| bool | optional = optional ) |
Initialize the ModConfig.
- Parameters
-
apply bool. Whether to apply MOD. epochs int. Number of training epochs. warmup_epochs int. Number of warmup epochs. lr_act_scale float. Learning rate for activation scale. lr_zeropoint float. Learning rate for zeropoint. lr_weight_scale float. Learning rate for weight scale. lr_weight float. Learning rate for weight. lr_bias float. Learning rate for bias. lr_min_ratio float. Minimum learning rate ratio for scheduler. batch_size int. Batch size for training. q_drop float. QDrop ratio. quantize_weight bool. Quantize weight during training. weight_scale_init str. Weight scale initialization method. downresol_mode str. Down-resolution mode for fake quantization. post_processing str. Post-processing function. box_conf_thres float. Box confidence threshold for NMS. box_iou_thres float. Box IoU threshold for NMS. loss_type str. Loss function type. use_outputs bool. Compare only intermediate layers. kl_temperature float. Temperature for KL divergence loss. recon_prob float. Sampling probability for intermediate layers. recon_coeff float. Coefficient for intermediate layer loss. lambda_0 float. First coefficient for AnchorlessDetection loss. lambda_1 float. Second coefficient for AnchorlessDetection loss. lambda_2 float. Third coefficient for AnchorlessDetection loss. anchors List. Anchor boxes configuration. use_xyxy bool. Use XYXY format. save_dir str. Directory to save results. seed int. Random seed. apply_layers List[str]. Layers to apply MOD. exclude_layers List[str]. Layers to exclude from MOD. optional bool. Indicates whether this config is optional. Use the default value defined as a class variable.
Definition at line 114 of file mod_config.py.
◆ default_config()
| qubee.configs.mod_config.ModConfig.default_config | ( | cls | ) |
Definition at line 221 of file mod_config.py.
◆ from_dict()
| qubee.configs.mod_config.ModConfig.from_dict | ( | cls, | |
| dict | config_dict ) |
Create ModConfig from dictionary (JSON structure)
Definition at line 225 of file mod_config.py.
◆ to_dict()
| qubee.configs.mod_config.ModConfig.to_dict | ( | self | ) |
Definition at line 310 of file mod_config.py.
◆ get_mod_config()
| ModConfig qubee.configs.mod_config.get_mod_config | ( | ** | kwargs | ) |
Create ModConfig with partial parameters merged with defaults.
Definition at line 356 of file mod_config.py.
Variable Documentation
◆ optional
|
static |
Definition at line 21 of file mod_config.py.
◆ DEFAULTS
|
static |
Definition at line 22 of file mod_config.py.
◆ py_to_cpp_name
|
static |
Definition at line 60 of file mod_config.py.
◆ min_max_check
|
static |
Definition at line 91 of file mod_config.py.
◆ apply
| qubee.configs.mod_config.ModConfig.apply = apply |
Definition at line 185 of file mod_config.py.
◆ epochs
| qubee.configs.mod_config.ModConfig.epochs = epochs |
Definition at line 186 of file mod_config.py.
◆ warmup_epochs
| qubee.configs.mod_config.ModConfig.warmup_epochs = warmup_epochs |
Definition at line 187 of file mod_config.py.
◆ lr_act_scale
| qubee.configs.mod_config.ModConfig.lr_act_scale = lr_act_scale |
Definition at line 188 of file mod_config.py.
◆ lr_zeropoint
| qubee.configs.mod_config.ModConfig.lr_zeropoint = lr_zeropoint |
Definition at line 189 of file mod_config.py.
◆ lr_weight_scale
| qubee.configs.mod_config.ModConfig.lr_weight_scale = lr_weight_scale |
Definition at line 190 of file mod_config.py.
◆ lr_weight
| qubee.configs.mod_config.ModConfig.lr_weight = lr_weight |
Definition at line 191 of file mod_config.py.
◆ lr_bias
| qubee.configs.mod_config.ModConfig.lr_bias = lr_bias |
Definition at line 192 of file mod_config.py.
◆ lr_min_ratio
| qubee.configs.mod_config.ModConfig.lr_min_ratio = lr_min_ratio |
Definition at line 193 of file mod_config.py.
◆ batch_size
| qubee.configs.mod_config.ModConfig.batch_size = batch_size |
Definition at line 194 of file mod_config.py.
◆ q_drop
| qubee.configs.mod_config.ModConfig.q_drop = q_drop |
Definition at line 195 of file mod_config.py.
◆ quantize_weight
| qubee.configs.mod_config.ModConfig.quantize_weight = quantize_weight |
Definition at line 196 of file mod_config.py.
◆ weight_scale_init
| qubee.configs.mod_config.ModConfig.weight_scale_init = weight_scale_init |
Definition at line 197 of file mod_config.py.
◆ downresol_mode
| qubee.configs.mod_config.ModConfig.downresol_mode = downresol_mode |
Definition at line 198 of file mod_config.py.
◆ post_processing
| qubee.configs.mod_config.ModConfig.post_processing = post_processing |
Definition at line 199 of file mod_config.py.
◆ box_conf_thres
| qubee.configs.mod_config.ModConfig.box_conf_thres = box_conf_thres |
Definition at line 200 of file mod_config.py.
◆ box_iou_thres
| qubee.configs.mod_config.ModConfig.box_iou_thres = box_iou_thres |
Definition at line 201 of file mod_config.py.
◆ loss_type
| qubee.configs.mod_config.ModConfig.loss_type = loss_type |
Definition at line 202 of file mod_config.py.
◆ use_outputs
| qubee.configs.mod_config.ModConfig.use_outputs = use_outputs |
Definition at line 203 of file mod_config.py.
◆ kl_temperature
| qubee.configs.mod_config.ModConfig.kl_temperature = kl_temperature |
Definition at line 204 of file mod_config.py.
◆ recon_prob
| qubee.configs.mod_config.ModConfig.recon_prob = recon_prob |
Definition at line 205 of file mod_config.py.
◆ recon_coeff
| qubee.configs.mod_config.ModConfig.recon_coeff = recon_coeff |
Definition at line 206 of file mod_config.py.
◆ lambda_0
| qubee.configs.mod_config.ModConfig.lambda_0 = lambda_0 |
Definition at line 207 of file mod_config.py.
◆ lambda_1
| qubee.configs.mod_config.ModConfig.lambda_1 = lambda_1 |
Definition at line 208 of file mod_config.py.
◆ lambda_2
| qubee.configs.mod_config.ModConfig.lambda_2 = lambda_2 |
Definition at line 209 of file mod_config.py.
◆ anchors
| qubee.configs.mod_config.ModConfig.anchors = anchors |
Definition at line 210 of file mod_config.py.
◆ use_xyxy
| qubee.configs.mod_config.ModConfig.use_xyxy = use_xyxy |
Definition at line 211 of file mod_config.py.
◆ save_dir
| qubee.configs.mod_config.ModConfig.save_dir = save_dir |
Definition at line 212 of file mod_config.py.
◆ seed
| qubee.configs.mod_config.ModConfig.seed = seed |
Definition at line 213 of file mod_config.py.
◆ apply_layers
| qubee.configs.mod_config.ModConfig.apply_layers = apply_layers |
Definition at line 214 of file mod_config.py.
◆ exclude_layers
| qubee.configs.mod_config.ModConfig.exclude_layers = exclude_layers |
Definition at line 215 of file mod_config.py.
Generated by