From what I understand, the difference between Variable(Tensor.cuda()) and Variable(Tensor).cuda() will only come into play when my training task requires the gradient with respect to the inputs. Otherwise, for training tasks like object recognition on ImageNet, both these declarations won’t make any difference as because the task doesn’t need the gradients with respect to the inputs (images in this case). Is my understanding correct?
The reason I ask this because I have seen both these declarations being used in example code and repos.