Giter VIP home page Giter VIP logo

Comments (5)

Zehaos avatar Zehaos commented on May 29, 2024

Hi, wetliu

Someone did it on the iphone7 platform, showing that mobilenet with depthwise-conv is almost 10 times faster than the convolution counterpart. Click here(in Chinese).
I have no knowledge about pytorch, I think it is not so difficult to add a depthwise-conv operator into pytorch if it haven't been implemented.

Best,
Zehao

from mobilenet.

wetliu avatar wetliu commented on May 29, 2024

Oh, sorry for the confusion. I am wondering if you also compare mobilenet and its counter part on GPU? Thank you.

from mobilenet.

Zehaos avatar Zehaos commented on May 29, 2024

No.

from mobilenet.

wenwei202 avatar wenwei202 commented on May 29, 2024

It may be faster in mobile devices using low-end cpus which are more about sequential execution, but going to be (much) slower in high-end / high-parallel processors, like GPU. High-end/parallel processors prefer a large chunk of computation at one time, instead of a butch of small computations (like depth-wise convolutions). This is can the reason why mobilenet doesn't show any real-time speedup. Theoretical speedup (multi-add reduction) is totally different from real-time speedup. You can check figure 1 in this NIPS paper, showing L1 regularization/connection pruning can remove 95% connections in conv layers but even shows down the real-time speed in GPUs.

from mobilenet.

wetliu avatar wetliu commented on May 29, 2024

Just to other people who will view this issue in the future, the real problem is not the parallel or sequential computing, but the old implementation of convolution operator through im2col and especially, col2im. These two functions in depthwise convolution are not necessary, and will lead to block divergence on GPU (col2im in the case of backpropagation).

The real speed up on the mobilenet is its 1x1 convolution kernel which takes most of time if the depthwise convolution is well optimized.

@wenwei202 Thank you for your comment, but your L1 example is not a very good example here because either you need to change your convolution connection through a sparseMM operator, or you will have to use GEMM on GPU even most of the connects are sparse.

from mobilenet.

Related Issues (20)

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.