Skip to content

T-Mac-Curry/impl-pruning-caffemodel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apply simple pruning on Caffemodel

  1. Get caffemodel from model zoo

  2. open proto.py(or pycaffe.py) and specify the name of target layer and its pruning ratio

# AlexNet example
ratio = {"fc6":0.91, "fc7":0.91, "fc8":0.75}
  1. Example commandline usage.
# Using protobuf api
proto.py bvlc_alexnet.caffemodel output_pruned.caffemodel

# Using pycaffe api
pycaffe.py deploy.prototxt bvlc_alexnet.caffemodel output_pruned.caffemodel

To run pycaffe.py, pycaffe should be built in advance.

About

Simple pruning example using Caffe

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%