# An error about the concatenate layer

**URL:** <https://community.deeplearning.ai/t/an-error-about-the-concatenate-layer/16958>\
**Category:** Sequence Models\
**Tags:** coursera-platform\
**Created:** [June 24, 2021, 2:45pm UTC](https://community.deeplearning.ai/t/an-error-about-the-concatenate-layer/16958 "2021-06-24T14:45:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Meir](https://avatars.discourse-cdn.com/v4/letter/m/2acd7d/32.png) [@Meir](https://community.deeplearning.ai/u/Meir)\
**Post date:** [June 24, 2021, 2:45pm UTC](https://community.deeplearning.ai/t/an-error-about-the-concatenate-layer/16958/1 "2021-06-24T14:45:23Z")

</div>

I am confused about the error I am getting when `summary` is called in the test code in Assignment 1 of Week 3 of Course 5:

> AttributeError: The layer “concatenate” 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.

The only concatenation layer I am aware of is in `one_step_attention()`. There we concatenate `a` and `s_prev` (the latter after being repeated). I print out the shapes of both before concatenation and they are same: `(None, 30, 64)`.

What could I be doing wrong?

---

<div class="post-metadata">

**Author:** ![Kic](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/kic/32/76339_2.png) [@Kic](https://community.deeplearning.ai/u/Kic)\
**Post date:** [June 30, 2021, 11:14am UTC](https://community.deeplearning.ai/t/an-error-about-the-concatenate-layer/16958/2 "2021-06-30T11:14:36Z")

</div>

Hi @Meir

Have you found the solution yet? Let’s know if we could help.

---

<div class="post-metadata">

**Author:** ![Meir](https://avatars.discourse-cdn.com/v4/letter/m/2acd7d/32.png) [@Meir](https://community.deeplearning.ai/u/Meir)\
**Post date:** [June 30, 2021, 11:55am UTC](https://community.deeplearning.ai/t/an-error-about-the-concatenate-layer/16958/3 "2021-06-30T11:55:59Z")

</div>

I don’t remember what I did, but I am past this problem. Thank you.

---

<div class="post-metadata">

**Author:** ![Andi](https://avatars.discourse-cdn.com/v4/letter/a/5fc32e/32.png) [@Andi](https://community.deeplearning.ai/u/Andi)\
**Post date:** [July 24, 2021, 10:00am UTC](https://community.deeplearning.ai/t/an-error-about-the-concatenate-layer/16958/4 "2021-07-24T10:00:11Z")

</div>

You have to restart the kernel
