Depends on the use case and how the data is stored. Usually I load the data lazily as it also allows for faster debugging (startup time is lower).


The entire tensor should not be copied to the device.





 seedship:

Is DenseNet just a memory hog after an input is passed through?


That might be the case. I’m not sure which GPUs are provided in Google Colab, but you might try to check the memory footprint there (if they provide devices with more than 8GB).