Hi,
I think the problem is because the forward function keeps calling the initialization of h0, h1, c0, and c1. So, in this case, you always use vector zeros as the hidden state. Try to remove it from the forward function.
Also, I don’t think that initialization is necessary. As mentioned in the documentation:

If (h_0, c_0) is not provided, both  h_0  and  c_0  default to zero.