banikr:

Is there a way to iterate 192 patches as
src: [batch_size, 1, 16, 64, 64]
trgt:[batch_size, 9, 8, 32, 32] and feed to Dataloader and also iterate 3D images in Dataset?


I’m not sure I understand the issue correctly.
The Dataset approach would create the patches and the DataLoader would then return tensors with batch_size*num_patches in dim0, which you could feed directly into the model.
Why would you have to store the patches again?