This post introduces how to train the LSTM networks to get correct outputs.
If you use this way, not work.
- Just use the last width, like
x[-1, :, :], select the last piece of width. - It’s normal way. However, sometimes it will NOT WORK.

This way will work.
- Flatten all the output

- It always works.
Have fun.
Besides, I found marimo, which is a replacement for jupyter notebooks.