Solved by SimonW in post #6 
              
              
                Dataset and module serve different purposes. I don’t think it makes sense to merge them together. Moreover, most of the time you want dataset to return CPU tensors and use multiprocessing dataloader and then convert the fetched data to GPU tensors before using them with the model. So I would suggest…