Thanks for your reply. The problem is with the use of experience replay. It is sequential as well as dynamic, so the dataset would be keep on changing. This makes it impossible to use the Dataset and DataLoader class. As for saving, I suspect saving would only introduce way more overhead if I am saving and loading that frequently…Therefore I am really looking for ways where I can do such transformation in the gpu explicitly by batch…Thanks again