The storage of 10 frames of shape 227x227 shouldn’t cause any problems itself.
Assuming that you are dealing with RGB images, you would only use approx. 10*227*227*3*4 / 1024**2 = 5.9MB, if you store the images in FP32.
Do you run out of memory directly after loading the data or could some other code part (e.g. model forward/backward) cause this issue?