LSTM Binary Classifier Backward() Error During Training

You can have a look at the older post.

I way to handle it can be found here; search for # Handle directions in the forward() method.