|
9 | 9 | } |
10 | 10 | }, |
11 | 11 | "source": [ |
12 | | - "# PoseNet Post-Training Quantization in PyTorch using the Model Compression Toolkit(MCT)\n", |
| 12 | + "# PoseNet and Mixed-Precision Post-Training Post-Training Quantization in PyTorch using the Model Compression Toolkit(MCT)\n", |
13 | 13 | "\n", |
14 | 14 | "## Overview\n", |
15 | | - "This quick-start guide explains how to use the **Model Compression Toolkit (MCT)** to quantize a PoseNet model. We will load a pre-trained model and quantize it using the MCT with **Post-Training Quantization (PTQ)**. \n", |
| 15 | + "This quick-start guide explains how to use the **Model Compression Toolkit (MCT)** to quantize a PoseNet model. We will load a pre-trained model and quantize it using the MCT with **Mixed-Precision Post-Training Quantization (PTQ)** .\n", |
16 | 16 | "\n", |
17 | 17 | "## Summary\n", |
18 | 18 | "In this tutorial, we will cover:\n", |
|
181 | 181 | "- CALIB_ITER \n", |
182 | 182 | " This parameter allows you to set how many samples to use when generating representative data for quantization.\n", |
183 | 183 | "- WEIGHTS_COMPRESSION_RATIO \n", |
184 | | - " This parameter allows you to set the quantized ratio from the size of the 8-bit model's weights." |
| 184 | + " This parameter allows you to set the quantization ratio based on the weight size of the 8-bit model when using mixed-precision quantization." |
185 | 185 | ] |
186 | 186 | }, |
187 | 187 | { |
|
296 | 296 | "id": "b64c60b0", |
297 | 297 | "metadata": {}, |
298 | 298 | "source": [ |
299 | | - "In this class, we process the downloaded COCO's dataset for evaluation during quantization and for use in calibration." |
| 299 | + "In this class, we process the downloaded COCO's dataset for calibration during quantization and for use in evaluation." |
300 | 300 | ] |
301 | 301 | }, |
302 | 302 | { |
|
485 | 485 | }, |
486 | 486 | { |
487 | 487 | "cell_type": "code", |
488 | | - "execution_count": 153, |
| 488 | + "execution_count": null, |
489 | 489 | "id": "f25783c9", |
490 | 490 | "metadata": {}, |
491 | 491 | "outputs": [], |
492 | 492 | "source": [ |
493 | 493 | "configuration = mct.core.CoreConfig(\n", |
494 | | - " mixed_precision_config=mct.core.MixedPrecisionQuantizationConfig(num_of_images=32))" |
| 494 | + " mixed_precision_config=mct.core.MixedPrecisionQuantizationConfig(num_of_images=CALIB_ITER))" |
495 | 495 | ] |
496 | 496 | }, |
497 | 497 | { |
|
0 commit comments