Skip to content
Snippets Groups Projects
  • Bar's avatar
    fb98377e
    image_classifier.py: PTQ stats collection and eval in same run (#346) · fb98377e
    Bar authored
    * Previous implementation:
      * Stats collection required a separate run with `-qe-calibration`.
      * Specifying `--quantize-eval` without `--qe-stats-file` triggered
        dynamic quantization.
      * Running with `--quantize-eval --qe-calibration <num>` only ran
        stats collection and ignored --quantize-eval.
    
    * New implementation:
      * Running `--quantize-eval --qe-calibration <num>` will now 
        perform stats collection according to the calibration flag,
        and then quantize the model with the collected stats (and
        run evaluation).
      * Specifying `--quantize-eval` without `--qe-stats-file` will
        trigger the same flow as in the bullet above, as if 
        `--qe-calibration 0.05` was used (i.e. 5% of the test set will
        be used for stats).
      * Added new flag: `--qe-dynamic`. From now, to do dynamic 
        quantization, need to explicitly run:
        `--quantize-eval --qe-dynamic`
      * As before, can still run `--qe-calibration` without 
        `--quantize-eval` to perform "stand-alone" stats collection
      * The following flags, which all represent different ways to
        control creation of stats or use of existing stats, are now
        mutually exclusive:
        `--qe-calibration`, `-qe-stats-file`, `--qe-dynamic`,
        `--qe-config-file`
    fb98377e
    History
    image_classifier.py: PTQ stats collection and eval in same run (#346)
    Bar authored
    * Previous implementation:
      * Stats collection required a separate run with `-qe-calibration`.
      * Specifying `--quantize-eval` without `--qe-stats-file` triggered
        dynamic quantization.
      * Running with `--quantize-eval --qe-calibration <num>` only ran
        stats collection and ignored --quantize-eval.
    
    * New implementation:
      * Running `--quantize-eval --qe-calibration <num>` will now 
        perform stats collection according to the calibration flag,
        and then quantize the model with the collected stats (and
        run evaluation).
      * Specifying `--quantize-eval` without `--qe-stats-file` will
        trigger the same flow as in the bullet above, as if 
        `--qe-calibration 0.05` was used (i.e. 5% of the test set will
        be used for stats).
      * Added new flag: `--qe-dynamic`. From now, to do dynamic 
        quantization, need to explicitly run:
        `--quantize-eval --qe-dynamic`
      * As before, can still run `--qe-calibration` without 
        `--quantize-eval` to perform "stand-alone" stats collection
      * The following flags, which all represent different ways to
        control creation of stats or use of existing stats, are now
        mutually exclusive:
        `--qe-calibration`, `-qe-stats-file`, `--qe-dynamic`,
        `--qe-config-file`
This project manages its dependencies using pip. Learn more
requirements.txt 399 B