-
- Downloads
AMC and other refactoring - large merge (#339)
*An implementation of AMC (the previous implementation code has moved to a new location under /distiller/examples/auto_compression/amc. AMC is aligned with the ‘master’ branch of Coach. *compress_classifier.py is refactored. The base code moved to /distiller/apputils/image_classifier.py. Further refactoring will follow. We want to provide a simple and small API to the basic features of a classifier-compression application. This will help applications that want to use the make features of a classifier-compression application, without the standard training regiment. AMC is one example of a stand-alone application that needs to leverage the capabilities of a classifier-compression application, but is currently coupled to `compress_classifier.py`. `multi-finetune.py` is another example. * ranked_structures_pruner.py: ** Added support for grouping channels/filters Sometimes we want to prune a group of structures: e.g. groups of 8-channels. This feature does not force the groups to be adjacent, so it is more like a set of structures. E.g. in the case of pruning channels from a 64-channels convolution, grouped by 8 channels, we will prune exactly one of 0/8/16/24/32/40/48/56 channels. I.e. always a multiple of 8-channels, excluding the set of all 64 channels. ** Added FMReconstructionChannelPruner – this is channel pruning using L1-magnitude to rank and select channels to remove, and feature-map reconstruction to improve the resilience to the pruning. * Added a script to run multiple instances of an experiment, in different processes: examples/classifier_compression/multi-run.py * Set the seed value even when not specified by the command-line arguments, so that we can try and recreate the session. * Added pruning ranking noise - Ranking noise introduces Gaussian noise when ranking channels/filters using Lp-norm. The noise is introduced using the epsilon-greedy methodology, where ranking using exact Lp-norm is considered greedy. * Added configurable rounding of pruning level: choose whether to Round up/down when rounding the number of structures to prune (rounding is always to an integer).
Showing
- README.md 3 additions, 2 deletionsREADME.md
- distiller/apputils/image_classifier.py 837 additions, 0 deletionsdistiller/apputils/image_classifier.py
- distiller/data_loggers/tbbackend.py 3 additions, 0 deletionsdistiller/data_loggers/tbbackend.py
- distiller/pruning/__init__.py 2 additions, 1 deletiondistiller/pruning/__init__.py
- distiller/pruning/ranked_structures_pruner.py 327 additions, 72 deletionsdistiller/pruning/ranked_structures_pruner.py
- distiller/summary_graph.py 4 additions, 2 deletionsdistiller/summary_graph.py
- distiller/thinning.py 8 additions, 8 deletionsdistiller/thinning.py
- examples/auto_compression/README.md 6 additions, 0 deletionsexamples/auto_compression/README.md
- examples/auto_compression/__init__.py 0 additions, 0 deletionsexamples/auto_compression/__init__.py
- examples/auto_compression/amc/README.md 38 additions, 0 deletionsexamples/auto_compression/amc/README.md
- examples/auto_compression/amc/__init__.py 0 additions, 0 deletionsexamples/auto_compression/amc/__init__.py
- examples/auto_compression/amc/adc_vgg16_cifar_finetuning.yaml 0 additions, 0 deletions...ples/auto_compression/amc/adc_vgg16_cifar_finetuning.yaml
- examples/auto_compression/amc/amc.py 216 additions, 0 deletionsexamples/auto_compression/amc/amc.py
- examples/auto_compression/amc/amc_args.py 28 additions, 9 deletionsexamples/auto_compression/amc/amc_args.py
- examples/auto_compression/amc/auto_compression_channels.yaml 100 additions, 0 deletionsexamples/auto_compression/amc/auto_compression_channels.yaml
- examples/auto_compression/amc/auto_compression_filters.yaml 58 additions, 0 deletionsexamples/auto_compression/amc/auto_compression_filters.yaml
- examples/auto_compression/amc/environment.py 823 additions, 0 deletionsexamples/auto_compression/amc/environment.py
- examples/auto_compression/amc/imgs/amc_worksheet.png 0 additions, 0 deletionsexamples/auto_compression/amc/imgs/amc_worksheet.png
- examples/auto_compression/amc/jupyter/amc_plain20.ipynb 626 additions, 0 deletionsexamples/auto_compression/amc/jupyter/amc_plain20.ipynb
- examples/auto_compression/amc/jupyter/amc_random.ipynb 453 additions, 0 deletionsexamples/auto_compression/amc/jupyter/amc_random.ipynb
Loading
Please register or sign in to comment