# Week1 Assignment 3 Exercise 2, Unclear Error Message

**URL:** <https://community.deeplearning.ai/t/week1-assignment-3-exercise-2-unclear-error-message/515226>\
**Category:** Sequence Models\
**Tags:** coursera-platform\
**Created:** [December 10, 2023, 10:56am UTC](https://community.deeplearning.ai/t/week1-assignment-3-exercise-2-unclear-error-message/515226 "2023-12-10T10:56:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yuhan\_Chen](https://avatars.discourse-cdn.com/v4/letter/y/6f9a4e/32.png) [@Yuhan\_Chen](https://community.deeplearning.ai/u/Yuhan_Chen)\
**Post date:** [December 10, 2023, 10:56am UTC](https://community.deeplearning.ai/t/week1-assignment-3-exercise-2-unclear-error-message/515226/1 "2023-12-10T10:56:18Z")

</div>

Dear course mentors,

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

AttributeError Traceback (most recent call last)  
 in   
2  
3 # UNIT TEST  
----\> 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)  
2193  
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

---

<div class="post-metadata">

**Author:** ![Yuhan\_Chen](https://avatars.discourse-cdn.com/v4/letter/y/6f9a4e/32.png) [@Yuhan\_Chen](https://community.deeplearning.ai/u/Yuhan_Chen)\
**Post date:** [December 10, 2023, 11:11am UTC](https://community.deeplearning.ai/t/week1-assignment-3-exercise-2-unclear-error-message/515226/2 "2023-12-10T11:11:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [December 10, 2023, 7:37pm UTC](https://community.deeplearning.ai/t/week1-assignment-3-exercise-2-unclear-error-message/515226/3 "2023-12-10T19:37:37Z")

</div>

Thanks for your report. I will close the thread.

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [December 10, 2023, 7:37pm UTC](https://community.deeplearning.ai/t/week1-assignment-3-exercise-2-unclear-error-message/515226/4 "2023-12-10T19:37:40Z")

</div>

Closed on December 10, 2023, 7:37pm UTC


