All Projects → kentaroy47 → Deep-Compression.Pytorch

kentaroy47 / Deep-Compression.Pytorch

Licence: MIT license
Unofficial Pytorch implementation of Deep Compression in CIFAR10

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Deep-Compression.Pytorch

RMNet
RM Operation can equivalently convert ResNet to VGG, which is better for pruning; and can help RepVGG perform better when the depth is large.
Stars: ✭ 129 (+344.83%)
Mutual labels:  resnet, pruning
neuralBlack
A Multi-Class Brain Tumor Classifier using Convolutional Neural Network with 99% Accuracy achieved by applying the method of Transfer Learning using Python and Pytorch Deep Learning Framework
Stars: ✭ 36 (+24.14%)
Mutual labels:  accuracy, resnet
sparsezoo
Neural network model repository for highly sparse and sparse-quantized models with matching sparsification recipes
Stars: ✭ 264 (+810.34%)
Mutual labels:  resnet, pruning
jetbrains-utility
Remove/Backup – settings & cli for macOS (OS X) – DataGrip, AppCode, CLion, Gogland, IntelliJ, PhpStorm, PyCharm, Rider, RubyMine, WebStorm
Stars: ✭ 62 (+113.79%)
Mutual labels:  pruning
Generalizing-Lottery-Tickets
This repository contains code to replicate the experiments given in NeurIPS 2019 paper "One ticket to win them all: generalizing lottery ticket initializations across datasets and optimizers"
Stars: ✭ 48 (+65.52%)
Mutual labels:  pruning
Music-Genre-Classification
Genre Classification using Convolutional Neural Networks
Stars: ✭ 27 (-6.9%)
Mutual labels:  accuracy
neural-dream
PyTorch implementation of DeepDream algorithm
Stars: ✭ 110 (+279.31%)
Mutual labels:  resnet
Water-classifier-fastai
Deploy your Flask web app classifier on Heroku which is written using fastai library.
Stars: ✭ 37 (+27.59%)
Mutual labels:  resnet
pscp
Per-session checkpoint for boosting up your research
Stars: ✭ 14 (-51.72%)
Mutual labels:  checkpoint
DebugVision
Portable set of log collection and visualization tools
Stars: ✭ 45 (+55.17%)
Mutual labels:  accuracy
simpleAICV-pytorch-ImageNet-COCO-training
SimpleAICV:pytorch training example on ImageNet(ILSVRC2012)/COCO2017/VOC2007+2012 datasets.Include ResNet/DarkNet/RetinaNet/FCOS/CenterNet/TTFNet/YOLOv3/YOLOv4/YOLOv5/YOLOX.
Stars: ✭ 276 (+851.72%)
Mutual labels:  resnet
MVCNN-PyTorch
No description or website provided.
Stars: ✭ 79 (+172.41%)
Mutual labels:  resnet
BMW-IntelOpenVINO-Detection-Inference-API
This is a repository for a No-Code object detection inference API using the OpenVINO. It's supported on both Windows and Linux Operating systems.
Stars: ✭ 66 (+127.59%)
Mutual labels:  resnet
NaiveNASflux.jl
Your local Flux surgeon
Stars: ✭ 20 (-31.03%)
Mutual labels:  pruning
tf-imagenet
TensorFlow ImageNet - Training and SOTA checkpoints
Stars: ✭ 50 (+72.41%)
Mutual labels:  checkpoint
ReZero-ResNet
Unofficial pytorch implementation of ReZero in ResNet
Stars: ✭ 23 (-20.69%)
Mutual labels:  resnet
ModelZoo.pytorch
Hands on Imagenet training. Unofficial ModelZoo project on Pytorch. MobileNetV3 Top1 75.64🌟 GhostNet1.3x 75.78🌟
Stars: ✭ 42 (+44.83%)
Mutual labels:  resnet
TensorMONK
A collection of deep learning models (PyTorch implemtation)
Stars: ✭ 21 (-27.59%)
Mutual labels:  resnet
batchnorm-pruning
Rethinking the Smaller-Norm-Less-Informative Assumption in Channel Pruning of Convolution Layers https://arxiv.org/abs/1802.00124
Stars: ✭ 66 (+127.59%)
Mutual labels:  pruning
mmrazor
OpenMMLab Model Compression Toolbox and Benchmark.
Stars: ✭ 644 (+2120.69%)
Mutual labels:  pruning

Pytorch implementation of Deep Compression

Dataset: CIFAR10 Models: VGG16, Resnet18~

  • Image classification
  • Image segmentation
  • Image detection

To start with..

clone the repo to your local.

git clone https://github.com/kentaroy47/Deep-Compression.Pytorch

The CIFAR10 trained models are in checkpoint.

VGG Res18
85.8% 89.8%

Resnet is still underfitting.

To do pruning..

The pretrained resnet18 should be in checkpoint/res18.t7. The val accuracy is about 90%.

# This will prune the default resnet18 with 50% parameters of conv2d.
# It will do 20 epochs of retraining as well.
python prune.py

Pruning results for resnet18.

no pruning 10% pruned 25% pruned 50% pruned 75% pruned
89.8% 90.3% 91.2% 91.7% 91.9%

Even with 50% pruned weights, the accuracy is about the same (90%).

You can try arbitary pruning rates:

# This will prune 75% of conv parameters.
python prune.py --prune 0.75

To train your own model

I provided a CIFAR 10 trained resnet18 checkpoint to get started with.

If you want to train your own network, do:


# for vgg and resnet50
python train_cifar10.py --net vgg
python train_cifar10.py --net res50

Training script

You can train multiple pruned resnet by script.

sh prune.sh

TODO:

Quantization HuffmanCoding

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].