Solved by samarth-robo in post #2 
              
              
                Posting my solution here for reference. The solution divides the data into ‘groups’ of M images. The user specifies M based on the size of their GPU and resolution of the images. 
This solution loops through the N x T x C x H x W data by figuring out B x G x C x H x W batches based on the M value. 
#…