jacobgil/pytorch-pruning has 883 GitHub stars and 202 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-15 12:34 UTC. Last push 2019-07-12.
計測したスター増加
- 24時間
- 0
- 7日間
- 履歴を収集中
- 15日間
- 履歴を収集中
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
概要
PyTorch Implementation of [1611.06440] Pruning Convolutional Neural Networks for Resource Efficient Inference
機械学習README.md
オリジナルPyTorch implementation of [1611.06440 Pruning Convolutional Neural Networks for Resource Efficient Inference]
This demonstrates pruning a VGG16 based classifier that classifies a small dog/cat dataset.
This was able to reduce the CPU runtime by x3 and the model size by x4.
For more details you can read the blog post.
At each pruning step 512 filters are removed from the network.
Usage
This repository uses the PyTorch ImageFolder loader, so it assumes that the images are in a different directory for each category.
Train
......... dogs
......... cats
Test
......... dogs
......... cats
The images were taken from here but you should try training this on your own data and see if it works!
Training:
python finetune.py --train
Pruning:
python finetune.py --prune
TBD
Change the pruning to be done in one pass. Currently each of the 512 filters are pruned sequentually.
for layer_index, filter_index in prune_targets: model = prune_vgg16_conv_layer(model, layer_index, filter_index)This is inefficient since allocating new layers, especially fully connected layers with lots of parameters, is slow.
In principle this can be done in a single pass.
Change prune_vgg16_conv_layer to support additional architectures. The most immediate one would be VGG with batch norm.