TypeError: relu(): argument 'input' (position 1) must be Tensor, not tuple. I believe it's because I have an LSTM layer

I believe error is because I have an LSTM layer. How can I modify the code so it will work fine? Any help?

Move the LSTM layer out of the Sequential layer.
LSTM returns a tuple of output, (hn, cn) where hn, cn are the last hidden states.
For example your init function will contain something like
class module(nn.Module):
    def __init__(self):
        super(nn.Module, self).__init__()
        self.lstm = nn.LSTM(...)
        self.seq = nn.Sequential(...)


and your forward function will be
def forward(self, x):
    lstm_out= self.lstm(x)
    out = self.seq(lstm_out[0])
    return out


