AttributeError: The layer "reshape_121" 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.
You can find lots of threads about this error by searching for “multiple inbound nodes”. Here’s another recent thread that gives some links.
The first thing to try is to make sure your notebook is in a consistent state:
Kernel -> Restart and Clear Output
Cell -> Run All
Then check if the error still occurs.
Also note that we’re not supposed to share solution code in a public way. If the mentors can’t figure out how to help without seeing your code, there are private ways to accomplish that. No harm is done, since I just edited your post to remove the source code.
That’s good news! If the “Kernel → Restart” trick works, that means that you had run some of the cells multiple times or in the wrong order. In a lot of the assignments in DLS C5, there are “stateful” global objects that get created (e.g. LSTM_cell in this instance) and executing some of the cells changes the state of the global objects. So it doesn’t always work if you run the test cell multiple times without running everything from scratch. Here’s a recent reply from Tom about a similar situation that explains this in more detail.