The training speed of between GPU and CPU is same?
When I using Pytorch for conditional gan , I found that the training speed had little change no matter using GPU nor CPU. There are some mistake in my codes?
xiaoxing_zeng
smth
Are you putting the net/model in cuda? Unlike Tensorflow, here you have to specify that you want to use GPU. For small models there isn’t much difference, but for big models there difference is quite big.
Ismail_Elezi
xiaoxing_zeng
Yes, you should send all the variables in cuda, but in addition you also need to send both the neural networks in cuda, in addition to the criterior (which contains the cost function). Something like: <SCODE>if opt.cuda:
    discriminator.cuda()
    generator.cuda()
    criterion.cuda()
    input, label = input.cuda(), label.cuda()
<ECODE> might do the trick.
Ismail_Elezi