open-reid
open-reid copied to clipboard
why convert the Variable(imgs) to [Variable(imgs)] (it makes more complicated) and without .cuda()?
- In trainer,the code is: inputs = [Variable(imgs)] outputs = self.model(*inputs) but the simple way is : inputs = Variable(imgs) outputs = self.model(inputs)
- 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()