Passing the input different ways to the same model

Hello,
I have a question about passing the same data in different shapes to the same model. So I have my data in the form of: samples, channels, x, y, z. And during my GAN training, I also need to pass the same data in the form of: samples/3, 3, channels, x, y, z. And the reason for doing this is that in the first version, all the training dataset would be shuffled. On the other hand, in the second version I am aiming to keep the sequence by grouping 3 consecutive samples, that is why I have the additional 3 which increases the shape of my dataset. Now my question is, I want to use the same model I have generated, as my data format is not changing with the number of channels, x, y and z components it has (Btw x, y, z components are the number of pixels). How can I pass my new data during training, so that I can still use the same model for both cases? Thank you.