Hi Chris,
Thanks for you kind help.
I’ve made two changes:

added one more linear layer and only apply activation to the first linear layer.
move my init_hidden() call inside of each batch.
However, the loss still doesn’t make too much sense. It seems that I could either say it doesn’t converge, or it converges right after the first epoch even if I changed learning_rate to be fairly small.

Epoch: 1/50... Loss: 1.055414...
Epoch: 2/50... Loss: 0.912548...
Epoch: 3/50... Loss: 0.910565...
Epoch: 4/50... Loss: 0.908848...
Epoch: 5/50... Loss: 0.908775...
Epoch: 6/50... Loss: 0.910205...
Epoch: 7/50... Loss: 0.909043...
Epoch: 8/50... Loss: 0.908118...
Epoch: 9/50... Loss: 0.908512...
Epoch: 10/50... Loss: 0.909467...
Epoch: 11/50... Loss: 0.908574...
Epoch: 12/50... Loss: 0.910017...
Epoch: 13/50... Loss: 0.908047...
Epoch: 14/50... Loss: 0.909087...
Epoch: 15/50... Loss: 0.908903...
Epoch: 16/50... Loss: 0.909994...
Epoch: 17/50... Loss: 0.908831...
Epoch: 18/50... Loss: 0.907960...
Epoch: 19/50... Loss: 0.908065...
Epoch: 20/50... Loss: 0.908613...
Epoch: 21/50... Loss: 0.908029...
Epoch: 22/50... Loss: 0.908592...
Epoch: 23/50... Loss: 0.909221...
Epoch: 24/50... Loss: 0.909286...
Epoch: 25/50... Loss: 0.908711...
Epoch: 26/50... Loss: 0.909153...
Epoch: 27/50... Loss: 0.908208...
Epoch: 28/50... Loss: 0.908390...
Epoch: 29/50... Loss: 0.909025...
Epoch: 30/50... Loss: 0.908518...
Epoch: 31/50... Loss: 0.908976...
Epoch: 32/50... Loss: 0.907897...
Epoch: 33/50... Loss: 0.908882...
Epoch: 34/50... Loss: 0.908293...
Epoch: 35/50... Loss: 0.910187...
Epoch: 36/50... Loss: 0.908621...
Epoch: 37/50... Loss: 0.908641...
Epoch: 38/50... Loss: 0.908749...
Epoch: 39/50... Loss: 0.907741...
Epoch: 40/50... Loss: 0.909765...
Epoch: 41/50... Loss: 0.907573...
Epoch: 42/50... Loss: 0.908850...
Epoch: 43/50... Loss: 0.910151...
Epoch: 44/50... Loss: 0.908220...
Epoch: 45/50... Loss: 0.908110...
Epoch: 46/50... Loss: 0.907462...
Epoch: 47/50... Loss: 0.908315...
Epoch: 48/50... Loss: 0.907731...
Epoch: 49/50... Loss: 0.908232...
Epoch: 50/50... Loss: 0.908183...

In my previous posts I posted 2 versions of implementations, which should be quite similar. On the other version after I made the changes, I got all Loss become nan.
I wonder if it is because my dataset isn’t suitable for training using LSTM? But in my understanding, even if the training performance isn’t good, the loss should converge if my implementation is correct.
I’m looking forward to receive more advice.
Thanks!