Memory error on using data generator in keras
It seems like the root cause for this is that zca_whitening is set to True. According to the answer from the keras-collaborator rragundez in this related Github issue, there is no work-around for it, except disabling ZCA whitening:


  This is known problem with the ZCA method. There is no real immediate way around it. The problem is with the calculation of the sigma matrix which is a dot product.


The other alternative to disabling it would be to use images with a smaller resolution. But I suppose that's rarely a practical solution.