Hi guys,
I’m new one to pytorch and cuda.(BTW, pytorch is quite friendly to new ones )
And I’m just confused when i’m reading these codes:
`net = torch.nn.DataParallel(net)`
`net = net.cuda()`
I only know that cuda()
and DataParallel()
has something to do with GPU and parallel computation etc.
But what’s the difference in those two lines? What have they done respectively?
Also, what happens if the second line is removed?
Thanks in advance!