I agree with you, according to the documentation If (h_0, c_0) is not provided, both h_0 and c_0 default to zero. https://pytorch.org/docs/stable/nn.html#lstm 262
So the hidden state and the cell state reset to zero for every epoch regardless, you don’t have to pass any initial states unless you are initializing them to something else.
In my opinion, it only makes sense to have those in the LSTMCell class since we init the hidden and cell states with the previous cell’s hidden and cell states.