1 & 2. Usually data loader doesn’t need to put things onto GPU. Even if it does, it shouldn’t use much GPU memory.
3. Yes when testing.
4. empty_cache has no effect on the amount of memory used by pytorch.
5. Because Tensor and Variable are now the same class, and torch.no_grad is a more reasonable approach.