1) In trainer,the code is:
inputs = [Variable(imgs)]
outputs = self.model(*inputs)
but the simple way is :
inputs = Variable(imgs)
outputs = self.model(inputs)
2) why not .cuda() of the imgs so that Variable(imgs.cuda())
For my understanding, through a GPU net (model = model.cuda()), the variable imgs on CPU with convert to GPU as well. There is no need to do imgs.cuda()
1) In trainer,the code is: inputs = [Variable(imgs)] outputs = self.model(*inputs) but the simple way is : inputs = Variable(imgs) outputs = self.model(inputs) 2) why not .cuda() of the imgs so that Variable(imgs.cuda())