stm32-modelzoo-app / image_classification /config_file_examples /quantization_inspection_config.yaml
| general: | |
| logs_dir: logs | |
| saved_models_dir: saved_models | |
| display_figures: False | |
| gpu_memory_limit: 24 | |
| model: | |
| model_path: ../../stm32ai-modelzoo/image_classification/mobilenetv1/Public_pretrainedmodel_public_dataset/imagenet/mobilenetv1_a050_224/mobilenetv1_a050_224.keras | |
| operation_mode: quantization | |
| dataset: | |
| dataset_name: imagenet | |
| quantization_path: /local/data/ic_imagenet_2012/quantization/ | |
| quantization_split: 0.01 | |
| preprocessing: | |
| rescaling: | |
| scale: 1/127.5 | |
| offset: -1 | |
| resizing: | |
| interpolation: nearest | |
| aspect_ratio: fit | |
| color_mode: rgb | |
| quantization: | |
| operating_mode: inspection | |
| quantizer: Onnx_quantizer | |
| quantization_type: PTQ | |
| target_opset: 21 | |
| export_dir: quantized_models | |
| quantization_input_type: uint8 | |
| quantization_output_type: float | |
| onnx_quant_parameters: | |
| weightType: Int4 # Int4, UInt4, Int8, UInt8, Int16, UInt16 | |
| activType: Int8 # Int4, UInt4, Int8, UInt8, Int16, UInt16 | |
| calibrate_method: MinMax # MinMax or Entropy | |
| op_types_to_quantize: #['Conv'] for example or keep empty | |
| nodes_to_quantize: #['Conv__229'] onnx layer names or keep empty, not compatible with weights_tensor_override | |
| nodes_to_exclude: ['Conv__237'] # onnx layer names or keep empty | |
| onnx_extra_options: | |
| WeightSymmetric: true | |
| ActivationSymmetric: false | |
| QuantizeBias: true | |
| CalibMovingAverage: true | |
| weights_tensor_override: [['mobilenet_0.50_224_1/conv1_1/convolution/merged_input:0', {'quant_type': Int8, "axis": 0}], | |
| ['mobilenet_0.50_224_1/conv_pw_7_1/convolution/merged_input:0', {'quant_type': Int8, "axis": 0}] | |
| ] | |
| activations_tensor_override: [['mobilenet_0.50_224_1/conv1_relu_1/Relu6:0', {'quant_type': Int16, 'scale': 0.0001, 'zero_point': 0}], | |
| ] | |
| iterative_quant_parameters: | |
| inspection_split: 0.8 | |
| mlflow: | |
| uri: ./tf/src/experiments_outputs/mlruns | |
| hydra: | |
| run: | |
| dir: ./tf/src/experiments_outputs/${now:%Y_%m_%d_%H_%M_%S} |