Giter Club home page Giter Club logo

Comments (9)

gngdb avatar gngdb commented on May 24, 2024 1

The entire script takes about 400ms for me to run, and the actual inference step y = net(x) takes about 70ms. The infer.py script never calls .cuda() so everything is running on CPU. I tried moving it to the GPU, but that just makes the single inference slower (takes longer to move the single image on and off the GPU); ends up being 16 seconds, with 5 seconds on inference.

from shufflenet.

gngdb avatar gngdb commented on May 24, 2024 1

For completeness, I was running with pytorch version 0.4.0, and pip freeze gave this. I installed the conda env following the instructions to build pytorch from source.

Also, here are the CPU details:

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                32
On-line CPU(s) list:   0-31
Thread(s) per core:    2
Core(s) per socket:    8
Socket(s):             2
NUMA node(s):          2
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 79
Model name:            Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz
Stepping:              1
CPU MHz:               1200.281

With an old conda env on pytorch version 0.2.0, it took 150ms for inference and 350ms for the whole script.

from shufflenet.

jaxony avatar jaxony commented on May 24, 2024 1

Hmm okay. I guess there's no need to improve speed if it works well enough. I'll figure out what the problem is on my end.

from shufflenet.

jaxony avatar jaxony commented on May 24, 2024

Hi @ildoonet, I'll take a look when I get time :)

from shufflenet.

jaxony avatar jaxony commented on May 24, 2024

I finally got around to doing some inference on ShuffleNet today. And it is definitely far too slow. Any ideas on how to speed it up? I suspect the snail-like speed is due to the frequent channel shuffling.

from shufflenet.

jaxony avatar jaxony commented on May 24, 2024

@gngdb if you have any ideas on how to speed it up in PyTorch, would love to know. I can't imagine doing a full training run at this speed. Speeding up would drastically help you with training too

from shufflenet.

gngdb avatar gngdb commented on May 24, 2024

What version of PyTorch are you running? The speed of grouped convolutions increased a lot in the most recent versions.

from shufflenet.

jaxony avatar jaxony commented on May 24, 2024

I'm running PyTorch 0.3.0 with CUDA. How long does it take for you to do one inference on the cat image? It takes probably 30 seconds for me.

from shufflenet.

DW1HH avatar DW1HH commented on May 24, 2024

@jaxony HI,have you solved it?

from shufflenet.

Related Issues (12)

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.