MissingInputError triggered when trying to run fit_generator on new model

I’m getting an error message that I’m unable to google my way into a solution to. The code can be viewed here.

Basically, I’m repurposing VGG16 to try and create an entry for the StateFarm Kaggle Comp. In the last section, I was combining the vgg layers with my new dense layers and marking the vgg layers as un-trainable - all so I could use data augmentation instead of pre-computing the output for training.

Irregardless if I set the VGG layers as trainable or not, I get the following error:

MissingInputError: ("An input of the graph, used to compute DimShuffle{x,x}(keras_learning_phase), was not provided and not given a value.Use the Theano flag exception_verbosity='high',for more information on this error.", keras_learning_phase)

I’ve googled this error a bunch but I’m not seeing anything that makes sense to me as a possible solution - there’s something here I’m not understanding. Any help?

Thanks!

The only bits of research I’ve found lead me to tehse two posts:

First, a github issue that points me towards the FAQ.

And the FAQ in question, look at How can I freeze layers.
At the bottom it mentions setting the learning phase, but as far as I can tell that’s being done by the fit_generator. This lead me to look into whether I put together the model correctly. Is constructing the model this way not correct?

I experimented with another method of putting the models together, by just adding each model as a layer to a new sequential model (ie new_model.add(vgg.model), new_model.add(model) and got the same error message)