younghwanoh / impl-pruning-caffemodel Goto Github PK
View Code? Open in Web Editor NEWSimple pruning example using Caffe
Simple pruning example using Caffe
I changed the source code to include more layers in the ratio array, but only 3 layers are being altered. How do you prune more layers?
Hello, when I am running proto.py bvlc_alexnet.caffemodel output_pruned.caffemodel encounter the following mistakes, what is the reason and how to solver the problem, thanks
dl@dl:~/home/impl-pruning-caffemodel-master$ python proto.py bvlc_alexnet.caffemodel output_pruned.caffemodel
layer name: fc8
width: 4096
height: 1000
pruning off 75.0 % of this layer
Traceback (most recent call last):
File "proto.py", line 51, in
i.blobs[0].data.extend(temp)
File "/usr/lib/python2.7/dist-packages/google/protobuf/internal/containers.py", line 125, in extend
if not elem_seq:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
I downloaded the alexnet from: https://github.com/BVLC/caffe/tree/master/models/bvlc_alexnet
Using the pycaffe.py to prune this net:
python pycaffe.py deploy.prototxt bvlc_alexnet.caffemodel alexnet_pruned.caffemodel
Then I use the alexnet_pruned.caffemodel for predicting the image using caffe python:
t_start = time.time()
output = net.forward()
t_stop = time.time()
duration = t_stop - t_start #performance
I have tested in both CPU and GPU mode(caffe.set_mode_cpu() & caffe.set_mode_gpu() ), the performance seems the same.
Hi, I use freeze.py on the VGG model, but the size of output.caffemodel is the same as the original size. Is this the result right?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.