I have run into an execution error while working the W4 assignment. While I understand the error description and am not quite sure why it occurred or fixing it. Guessing this may have to do with gen variable and train_generator runtime binding but, I am not sure. I have seen a similar error raised by someone else in the forum but, there was no answer with it. Request feedback.
Here is the code snippet in the train_happy_sad_model(train_generator)
history = model.fit (
train_generator,
steps_per_epoch=8,
epochs=15,
verbose=1,
callbacks=[callbacks]
)
and the call hist = train_happy_sad_model(gen) where gen = image_generator() that resulted in 80 samples with 2 classes
Here is a screen shot of the error.