-
- Downloads
Activation Histograms (#254)
Added a collector for activation histograms (sub-class of ActivationStatsCollector). It is stats-based, meaning it requires pre-computed min/max stats per tensor. This is done in order to prevent the need to save all of the activation tensors throughout the run. The stats are expected in the format generated by QuantCalibrationStatsCollector. Details: * Implemented ActivationHistogramsCollector * Added Jupyter notebook showcasing activation histograms * Implemented helper function that performs the stats collection pass and histograms pass in one go * Also added separate helper function just for quantization stats collection * Integrated in image classification sample * data_loaders.py: Added option to have a fixed subset throughout within the same session. Using it to keep the same subset between the stats collection and histograms collection phases. * Other changes: * Calling assign_layer_fq_names in base-class of collectors. We do this since the collectors, as implemented so far, assume this is done. So makes sense to just do it in the base class instead of expecting the user to do it. * Enforcing a non-parallel model for quantization stats and histograms collectors * Jupyter notebooks - add utility function to enable loggers in notebooks. This allows us to see any logging done by Distiller APIs called from notebooks.
Showing
- distiller/apputils/data_loaders.py 27 additions, 14 deletionsdistiller/apputils/data_loaders.py
- distiller/data_loggers/collector.py 285 additions, 10 deletionsdistiller/data_loggers/collector.py
- examples/classifier_compression/compress_classifier.py 40 additions, 31 deletionsexamples/classifier_compression/compress_classifier.py
- examples/classifier_compression/parser.py 5 additions, 0 deletionsexamples/classifier_compression/parser.py
- jupyter/activation_histograms.ipynb 367 additions, 0 deletionsjupyter/activation_histograms.ipynb
- jupyter/distiller_jupyter_helpers.ipynb 7 additions, 1 deletionjupyter/distiller_jupyter_helpers.ipynb
- jupyter/logging.conf 32 additions, 0 deletionsjupyter/logging.conf
Loading
Please register or sign in to comment