actually thats what I did. I saves the entire data set into torch.tensor variables inside of the init function of my dataset class.
Then I accessed only specific indices in the getitem method, but that did not improve on the gpu drops