Code Monkey home page Code Monkey logo

Comments (6)

yuanyuanli85 avatar yuanyuanli85 commented on September 25, 2024

AVX2 instructions are used here to accelerate the Kmeans processing. What's the version of your gcc? Does it build if you remove "-mavx2" compiler option?

from caffemodelcompression.

eonurk avatar eonurk commented on September 25, 2024

I got the issue done using my other computer. However, it gave me an error;

ImportError: No module named rpn.proposal_layer
Traceback (most recent call last):
File "caffemodel_compress.py", line 96, in
caffe_model_compress(prototxt, caffemodel, output, 6, 2)
File "caffemodel_compress.py", line 13, in caffe_model_compress
net = caffe.Net(model, caffe.TEST);
SystemError: NULL result without error in PyObject_Call

In the mean time, I want to ask you @yuanyuanli85 that if the compression is beneficial for making a net faster. For instance I got 500 ms detection time on Faster RCNN on Jetson TX1 module. Would the compression help to make it faster?

from caffemodelcompression.

kevin0932 avatar kevin0932 commented on September 25, 2024

Hi @eonurk, I got similar questions regarding the speed-up effect of such kind of compression techniques. Did you have any progress or rough result? Personally I wonder if it can help to speed up the convolutional neural networks with only conv and no fc layers. Thanks a lot!

from caffemodelcompression.

eonurk avatar eonurk commented on September 25, 2024

Actually I did not have a time to strugling with this problem. But in the end, it would be very beneficial for many people to know whether compression makes it faster or not. So please let me know if you find something about the issue:)

from caffemodelcompression.

yuanyuanli85 avatar yuanyuanli85 commented on September 25, 2024

Model compression reduces the computation a lot, ie. 32-bit float ->16-bit half-float. To run the compressed network, you need a hardware to support 16-bit half-float computation and a software framework. As I know, Nvidia P4/P40 has the support for half-float and int8. if we compress the weights to less bits, say 4 bits, we probably need a specific hardware, asic or fpga to run it.

from caffemodelcompression.

kevin0932 avatar kevin0932 commented on September 25, 2024

@yuanyuanli85 @eonurk Thanks for replying. It is that with specific hardware and smaller data types, the reduced computation is huge. How about sticking to the 32-bit float? From what I am understanding, the saved computation mainly comes from pruning stage and the paper only benchmarks the fc layers in terms of speedup. I think the speed-up requires a really sparse weight matrix to work with cuSPARSE (as they did with fc layers and more than 95% of the parameters are pruned!) For the convolutional layers, the sparsity is only around 40%-60%. So we may only expect little speed-up or even slower computation if cuSPARSE is used? Thanks

from caffemodelcompression.

Related Issues (17)

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.