GPU being used, code not speeding up

Hi,

I am using gpu for my code. However, the speed of the program is the same as it is for the cpu version of the code. (The gpu version is using the gpu).

How big is the network? You’ll get a much bigger speedup for a larger network.

Also - what type of network is it? How is it implemented? I assume it’s running just fine (no errors being thrown)? Are you timing forward passes or training?

I think I have solved the issue now. Thanks for the reply. The problem was that I had some variables not initialised as .cuda().

Is there a general principle in general while using the code for gpus. Writing .cuda() everytime is a little annoying

you should only have to call .cuda() 2 times, one for the input/target variables and one for the model.