If you want to use the model on the GPU, I would probably just use it inside the DataLoader loop, as it would process an entire batch (while in the __getitem__ of the Dataset it would process a single sample by default). Re-initializing it in the collate_fn wouldn’t yield any gain (besides the initialization overhead of course).