EX2,Neural Machine Translation

hello I think I wrote everything correctly but I got this error in Ex2, Neural Machine Translation:

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


Apparently you did not write everything correctly.

I fixed this in my case by applying the troubleshooting note from the Notebook:

  • If you are getting repeated errors after an initially incorrect implementation of “model”, but believe that you have corrected the error, you may still see error messages when building your model.
  • A solution is to save and restart your kernel (or shutdown then restart your notebook), and re-run the cells.

In my case I had previously setup the Bi-LSTM to have Tx units, rather than n_a units.


Thanks a lot Matthew1 for your response.

I did the same thing and it worked

1 Like

Thank you so much for the info! I restarted the kernel and the error went away.