Dear @Usama_Hasan, thanks for the information that you provided to me. It is great. However, I still have some questions.
1.- I still do not have clear the differences between hidden and hidden_size in the model.
Complete code in: https://colab.research.google.com/drive/1Q7q0dGTylMYMji1E3M104r0149xc9dbh?usp=sharing
class LSTM(nn.Module):
    def __init__(self, input_size=1, hidden_size=100):
        super().__init__()
        self.hidden= None
        self.hidden_size=hidden_size

        self.lstm1 = nn.LSTM(
            input_size=input_size,
            hidden_size=hidden_size,
            num_layers=1,
            batch_first=True,
            bidirectional=False,
        )
        self.lstm2 = nn.LSTM(
            hidden_size,
            hidden_size * 2,
            num_layers=1,
            batch_first=True,
            bidirectional=False,
        )
        self.fc = nn.Linear(hidden_size * 2, 1)

    def forward(self, x):
        x, _ = self.lstm1(x)
        x, _ = self.lstm2(x)

        x = self.fc(x)

        return x

2.- Why is the c_n part of the model not used in the second LSTM? Like here
https://colah.github.io/posts/2015-08-Understanding-LSTMs/
image739×313 43 KB
Thanks in advance.