Code Monkey home page Code Monkey logo

caffemodelcompression's Introduction

caffemodelcompression's People

Contributors

geoffreyqiu avatar yli150 avatar yuanyuanli85 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

caffemodelcompression's Issues

How to implement acceleration in the paper?

I am interesting in model compression and acceleration. In the paper(Deep Compression), the authors showed 3x speedup on CPU and 3.5x on GPU. But in here, I can't accelerate my AlexNet but only do compression and decompression. How to implement acceleration in the paper? Have any CNN accelerator in Caffe?
Thinks

Not Speed up in pvanet?

Thank you very much for sharing you code . But when I test, the inferece time for lenet or pvanet didn`t speed up. But accuracy is very lost.

usage of compressed model

Hi @yuanyuanli85
thank you for your work and share.
It looks very promising wrt to model size after compression. I would like to use compressed caffemodel, do you know how can i use it if I have hardware which is capable of low-bit calculation

-anand

Compression Result

Hello

I'm so interested for your project.
I have tried your code for VGG16 net, but why compress output become npz ?
Can i use this npz output to be pre trained model for my caffe ?

thanks

gcc: error: unrecognized command line option ‘-mavx2’

I got the following error while trying to build.

gcc: error: unrecognized command line option ‘-mavx2’
/usr/bin/ld: weights_compress.o: Relocations in generic ELF (EM: 62)
/usr/bin/ld: weights_compress.o: Relocations in generic ELF (EM: 62)
/usr/bin/ld: weights_compress.o: Relocations in generic ELF (EM: 62)
/usr/bin/ld: weights_compress.o: Relocations in generic ELF (EM: 62)
weights_compress.o: error adding symbols: File in wrong format

can you provide c++ interface

I want to decompress the model with c++, I see that this project is based on c++. Can you provide the c++ interface? Thanks.

Use case Instructions

Thanks for the code, I'm hoping it will be useful for my work.

It would be very helpful if you could provide some instructions on how to use this for the general use case, where someone wants to compress a previously trained model, fine-tune the compressed model, iterate as needed, and then use it for testing. Is this possible with the code that you provided, assuming caffe is already installed and working?

Thanks again.

压缩后测试问题

你好,非常感谢您提供代码。虽然我在进行物体检测研究时,用您的代码将我的模型压缩了十倍。从100M压到了11M,测试的时候也能被caffe使用,,但是速度明显下降,测试一张图片要3.5秒,这是不可接受的,请问,这是什么原因造成的?有解决办法吗

help

Hi, Thanks for you codes. What is the following sentence function to achieve?
caffe_model_decompress (netmodel, "alexnet_xx.caffemodel", "alexnetzip.npz")
Why is the output of alexnet_xx.caffemodel the size is not the same of the not compressed before? How to fine tune the data set test accuracy with the compressed model?I will be very grateful if anyone can help me, Thanks!

Compress Layers whitout bias

There's an index out of bounds error when trying to compress layers which do not include bias parameters. I can provide a solution via PR until next week.

some trouble about compressed network

Hi,
I have a trouble about network compression. for alexnet, we can compressed it, but how can we use the compressed model? If we decompress it to use, then we also get a big file and the speed was not speed up. my question is how to use the compressed model directly?

OverflowError: long int too large to convert to int

thanks for your code ,but when i run the code ,i got this error:
Traceback (most recent call last):
File "caffemodel_compress.py", line 96, in
caffe_model_compress(netmodel, netweights, output, 6, 2)
File "caffemodel_compress.py", line 20, in caffe_model_compress
for item in net.params.items():
File "/home/wl/caffe/python/caffe/pycaffe.py", line 68, in _Net_params
if len(lr.blobs) > 0])
OverflowError: long int too large to convert to int
help me please!

illegal instruction (core dump)

Thank you for your code!
when I run the code ,i got an error: illegal instruction (core dump)
I0405 19:50:28.866523 7248 upgrade_proto.cpp:61] Successfully upgraded file specified using deprecated V1LayerParameter
I0405 19:50:28.964052 7248 net.cpp:744] Ignoring source layer loss
compressing layer conv1
test1 here
test2 here
test3 here
illegal instruction (core dump).
i set flags(test* here) to check ,
codebook = np.empty((2**nbit),dtype=np.float32)
print "test3 here"
#t_start = time.time()
wqtz.compress_layer_weights(newlabel, codebook, weights_vec, vec_length, nbit)
#t_stop = time.time()
#kmeans_time = kmeans_time + t_stop - t_start
print "test4"
it seems that error comes from compress_layer_weights().
how can I solve it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.