{moderator edit - solution code removed}
===========================
and it gave following errors
AttributeError Traceback (most recent call last)
in
1 happy_model = happyModel()
2 # Print a summary for each layer
----> 3 for layer in summary(happy_model):
4 print(layer)
5
~/work/release/W1A2/test_utils.py in summary(model)
30 result =
31 for layer in model.layers:
—> 32 descriptors = [layer.class.name, layer.output_shape, layer.count_params()]
33 if (type(layer) == Conv2D):
34 descriptors.append(layer.padding)
/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py in output_shape(self)
2177 “”"
2178 if not self._inbound_nodes:
→ 2179 raise AttributeError('The layer has never been called ’
2180 ‘and thus has no defined output shape.’)
2181 all_output_shapes = set(
AttributeError: The layer has never been called and thus has no defined output shape.
===========================
could you please help