I needed to add the following code after creating the happy_model (sequential API) for the test cases to pass:
happy_model = happyModel()
# The following line needed to be added
happy_model.build(input_shape=(None,64,64,3))
# Print a summary for each layer
for layer in summary(happy_model):
print(layer)
My code was running, model was training OK but the test cases did not succeed till I made the change. Am I doing something wrong?
AttributeError: The layer has never been called and thus has no defined output shape.
Since I could not figure out how to change code in the coursera notebook environment, I added
model.build(input_shape=(None,64,64,3))
return model
In the happy_model function which made the test cases pass. This looks (and feels) rather bad but it makes the auto-grader happy so I ended up submitting like this.