Please, I am trying to train a LSTM but I don’t know where it is failing. I have the error:
ModuleAttributeError: ‘LSTM’ object has no attribute ‘hidden_size’.
Full code in Colab: https://colab.research.google.com/drive/1nHODrwukJZYMMnH-fkMTLlvA9o1ihv-r?usp=sharing 1
``
class LSTM(nn.Module):
def init(self, input_size=1, hidden_size=100):
super().init()
self.hidden= None
    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

´´