I have a Keras model, but it's too big for my local PC and I'm trying to migrate to Google cloud to be able to use TPU.
The examples that I have seen uses in memory images to train the model with fit function.
I have thousands of images and also I want to use image augmentation. In my local model I use ImageDataGenerator
and fit_generator
.
How do I do this using the TPU?
I have several ideas,
- To mount a bucket in the virtual machine
- Copy the images to the disk of virtual machine and use
ImageDataGenerator
as I do in my local machine.
But I'm not sure and I feel that all of these methods are inefficient.
Is there a way to do it efficiently?