RAM crash when using tf.image.resize

I am trying to resize the images in Fashion MNIST Dataset from (28,28) to (227,227) using the tf.image.resize function to test on my AlexNET model. However, this keeps constantly crashing the colab session presenting the error message “Your session crashed after using all available RAM”. The colab notebook link is here:-

Colab Notebook

I am unable to grasp the reason for this error. Please explain what am I doing wrong.

The Colab is private.

Sorry about that fixed it.

You could not resize all the image in dataset with a single op call tf.image.resize or you will go to exhaust RAM.
You could use the resize iterating over image batches.

1 Like