Week1 Assignment 3 Exercise 2, Unclear Error Message

Dear course mentors,

When running the unit test for excercise 2, the following error message showed up:

AttributeError Traceback (most recent call last)
----> 4 inference_summary = summary(inference_model)
5 comparator(inference_summary, music_inference_model_out)

~/work/W1A3/test_utils.py in summary(model)
34 result =
35 for layer in model.layers:
—> 36 descriptors = [layer.class.name, layer.output_shape, layer.count_params()]
37 if (type(layer) == Conv2D):
38 descriptors.append(layer.padding)

/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py in output_shape(self)
2190 'ill-defined for the layer. ’
2191 'Use get_output_shape_at(node_index)
→ 2192 ‘instead.’ % self.name)
2194 @property

AttributeError: The layer “lstm” has multiple inbound nodes, with different output shapes. Hence the notion of “output shape” is ill-defined for the layer. Use get_output_shape_at(node_index) instead.

As I proceed to the next cell (check the inference model), the results was exactly the same as expected results

1 Like

This problem can be solved by restart the kernel and run all the cells from the beginning again.

Sorry that i found the solution in the forum later but i did not find the button for closing the topic

1 Like

Thanks for your report. I will close the thread.