-
- Downloads
ADC (Automatic Deep Compression) example + features, tests, bug fixes (#28)
This is a merge of the ADC branch and master. ADC (using a DDPG RL agent to compress image classifiers) is still WiP and requires An unreleased version of Coach (https://github.com/NervanaSystems/coach). Small features in this commit: -Added model_find_module() - find module object given its name - Add channel ranking and pruning: pruning/ranked_structures_pruner.py - Add a CIFAR10 VGG16 model: models/cifar10/vgg_cifar.py - Thinning: change the level of some log messages – some of the messages were moved to ‘debug’ level because they are not usually interesting. - Add a function to print nicely formatted integers - distiller/utils.py - Sensitivity analysis for channels-removal - compress_classifier.py – handle keyboard interrupts - compress_classifier.py – fix re-raise of exceptions, so they maintain call-stack -Added tests: -- test_summarygraph.py: test_simplenet() - Added a regression test to target a bug that occurs when taking the predecessor of the first node in a graph -- test_ranking.py - test_ch_ranking, test_ranked_channel_pruning -- test_model_summary.py - test_png_generation, test_summary (sparsity/ compute/model/modules) - Bug fixes in this commit: -- Thinning bug fix: handle zero-sized 'indices' tensor During the thinning process, the 'indices' tensor can become zero-sized, and will have an undefiend length. Therefore, we need to check for this situation when assessing the number of elements in 'indices' -- Language model: adjust main.py to new distiller.model_summary API
Showing
- distiller/__init__.py 16 additions, 0 deletionsdistiller/__init__.py
- distiller/data_loggers/logger.py 5 additions, 3 deletionsdistiller/data_loggers/logger.py
- distiller/model_summaries.py 4 additions, 6 deletionsdistiller/model_summaries.py
- distiller/pruning/ranked_structures_pruner.py 55 additions, 1 deletiondistiller/pruning/ranked_structures_pruner.py
- distiller/sensitivity.py 9 additions, 2 deletionsdistiller/sensitivity.py
- distiller/thinning.py 6 additions, 18 deletionsdistiller/thinning.py
- distiller/utils.py 4 additions, 0 deletionsdistiller/utils.py
- examples/automated_deep_compression/ADC.py 357 additions, 0 deletionsexamples/automated_deep_compression/ADC.py
- examples/automated_deep_compression/presets/ADC_DDPG.py 73 additions, 0 deletionsexamples/automated_deep_compression/presets/ADC_DDPG.py
- examples/classifier_compression/compress_classifier.py 28 additions, 7 deletionsexamples/classifier_compression/compress_classifier.py
- examples/pruning_filters_for_efficient_convnets/resnet56_cifar_baseline_training.yaml 69 additions, 74 deletions..._efficient_convnets/resnet56_cifar_baseline_training.yaml
- examples/word_language_model/main.py 3 additions, 3 deletionsexamples/word_language_model/main.py
- models/__init__.py 0 additions, 1 deletionmodels/__init__.py
- models/cifar10/__init__.py 1 addition, 0 deletionsmodels/cifar10/__init__.py
- models/cifar10/vgg_cifar.py 133 additions, 0 deletionsmodels/cifar10/vgg_cifar.py
- tests/common.py 1 addition, 1 deletiontests/common.py
- tests/test_model_summary.py 63 additions, 0 deletionstests/test_model_summary.py
- tests/test_pruning.py 0 additions, 2 deletionstests/test_pruning.py
- tests/test_ranking.py 101 additions, 0 deletionstests/test_ranking.py
- tests/test_summarygraph.py 25 additions, 0 deletionstests/test_summarygraph.py
Loading
Please register or sign in to comment