ky_Pa:

For question 2, I want to confirm whether the inputs form CPU is tensor or Variable(tensor) before using cuda? Or the two forms are the same, because I understand at what version it seems that Variable and tensor are merged?


Yes, they are the same since PyTorch 0.4.
You can check the tensor directly, if it requires gradients etc, but there is no Variable usage anymore.