Thank you for your reply. Maybe I didn’t understand the whole problem myself before explaining. But now I do. So what I want to create batches of parts of the grid. If you think of it as an image is divided into subsets of the images, then randomly sample each of them to create new sub-images filled with random samples of those subdivisions.
So for example I want to make batches of shape [12,12,2] and [12,12,1] that have random samples of the data set. I think I would have to create and slice it in my own way. I tried to find something similar but I could find anything like it.
For now, I have done something similar to what you have told me to do.
Thank you for the reply, if you do know how I could start doing this it could improve my current code.