All Projects → DasudaRunner → Simplepruning

DasudaRunner / Simplepruning

Licence: mit
cnn pruning with tensorflow.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Simplepruning

Cnn Fixations
Visualising predictions of deep neural networks
Stars: ✭ 87 (-11.22%)
Mutual labels:  cnn
Cnn lstm for text classify
CNN, LSTM, NBOW, fasttext 中文文本分类
Stars: ✭ 90 (-8.16%)
Mutual labels:  cnn
Mobilenet V2 Caffe
MobileNet-v2 experimental network description for caffe
Stars: ✭ 93 (-5.1%)
Mutual labels:  cnn
Wb color augmenter
WB color augmenter improves the accuracy of image classification and image semantic segmentation methods by emulating different WB effects (ICCV 2019) [Python & Matlab].
Stars: ✭ 89 (-9.18%)
Mutual labels:  cnn
Snail Pytorch
Implementation of "A Simple Neural Attentive Meta-Learner" (SNAIL, https://arxiv.org/pdf/1707.03141.pdf) in PyTorch
Stars: ✭ 90 (-8.16%)
Mutual labels:  cnn
Geo Deep Learning
Deep learning applied to georeferenced datasets
Stars: ✭ 91 (-7.14%)
Mutual labels:  cnn
Cnn For Stock Market Prediction Pytorch
CNN for stock market prediction using raw data & candlestick graph.
Stars: ✭ 86 (-12.24%)
Mutual labels:  cnn
Pytorch Learners Tutorial
PyTorch tutorial for learners
Stars: ✭ 97 (-1.02%)
Mutual labels:  cnn
Cnn intent classification
CNN for intent classification task in a Chatbot
Stars: ✭ 90 (-8.16%)
Mutual labels:  cnn
Face landmark dnn
Face Landmark Detector based on Mobilenet V1
Stars: ✭ 92 (-6.12%)
Mutual labels:  cnn
Sleepeegnet
SleepEEGNet: Automated Sleep Stage Scoring with Sequence to Sequence Deep Learning Approach
Stars: ✭ 89 (-9.18%)
Mutual labels:  cnn
12306 captcha
基于深度学习识别12306验证码
Stars: ✭ 89 (-9.18%)
Mutual labels:  cnn
Libgdl
一个移动端跨平台的gpu+cpu并行计算的cnn框架(A mobile-side cross-platform gpu+cpu parallel computing CNN framework)
Stars: ✭ 91 (-7.14%)
Mutual labels:  cnn
Visual Feature Attribution Using Wasserstein Gans Pytorch
Implementation of Visual Feature Attribution using Wasserstein GANs (VAGANs, https://arxiv.org/abs/1711.08998) in PyTorch
Stars: ✭ 88 (-10.2%)
Mutual labels:  cnn
Hyperopt Keras Cnn Cifar 100
Auto-optimizing a neural net (and its architecture) on the CIFAR-100 dataset. Could be easily transferred to another dataset or another classification task.
Stars: ✭ 95 (-3.06%)
Mutual labels:  cnn
Pytorch
PyTorch tutorials A to Z
Stars: ✭ 87 (-11.22%)
Mutual labels:  cnn
Fast Autoaugment
Official Implementation of 'Fast AutoAugment' in PyTorch.
Stars: ✭ 1,297 (+1223.47%)
Mutual labels:  cnn
Captcharecognition
End-to-end variable length Captcha recognition using CNN+RNN+Attention/CTC (pytorch implementation). 端到端的不定长验证码识别
Stars: ✭ 97 (-1.02%)
Mutual labels:  cnn
Pytorch Pos Tagging
A tutorial on how to implement models for part-of-speech tagging using PyTorch and TorchText.
Stars: ✭ 96 (-2.04%)
Mutual labels:  cnn
Grad Cam
🌈 📷 Gradient-weighted Class Activation Mapping (Grad-CAM) Demo
Stars: ✭ 91 (-7.14%)
Mutual labels:  cnn

SimplePruning

This repository provides a cnn channels pruning demo with tensorflow. You can pruning your own model(support conv2d,depthwise conv2d,pool,fc,concat, add ops and so on) defined in modelsets.py. Have a good time!

 author Haibo     contributions welcome


Dependencies

  • Tensorflow >= 1.10.0
  • python >= 3.5
  • opencv-python >= 4.1.0
  • numpy >= 1.14.5
  • matplotlib >= 3.0.3

Getting Started

  • Clone the repository
  $ git clone https://github.com/DasudaRunner/SimplePruning.git
  • Downdload the Cifar10 dataset, and put into cifar-10-python/

    Url: http://www.cs.toronto.edu/~kriz/cifar.html

  • (Optional) Define your model in modesets.py

    You must use add_layer() API defined in pruner.py to set up your model. More details to modelsets.py

  • (Optional) Config params in utils/config.py

    e.g. model name, learning rate, pruning rate.

  • Train a full model, .ckpt and .pb model file will be saved in ckpt_model/
  $ python full_train.py
  • Channel pruning. .ckpt and .pb model file will be saved in channels_pruned_model/
  $ python channels_pruning.py

Supported ops (Tensorflow)

  • Conv2d
  • FullyConnected
  • MaxPooling, AveragePooling
  • BatchNormalization
  • Activation
  • DepthwiseConv2d
  • GlobalMaxPooling, GlobalAveragePooling
  • Concat
  • Add
  • Flatten

Evaluation on Cifar10 dataset

Model Dataset Pruning rate Model size / MB Inference time / ms*64pic
SimpleNet cifar-10 0.5 8.7 -> 1.8 5.8 -> 2.7
VGG19 cifar-10 0.5 53.4 -> 13.5 28.62 -> 9.44
DenseNet40 cifar-10 0.5 4.3 -> 1.5 77.87 -> 39.97
MobileNet V1 cifar-10 0.5 6.6 -> 1.8 19.39 -> 8.01
OCR-Net --- 0.5 2426.2 -> 841.9 10.36->7.3

Update logs

  • 2019.07.24
    • Add support for Add op.
    • Add support for ResNet18/ResNet34 in modelsets.py.
  • 2019.07.16
    • Add support for Concat op.
    • Add support for DenseNet40 in modelsets.py.
  • 2019.07.14
    • Reconsitution SimplePruning.
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].