def forward(self, x):
    if self.training:
        self.h = None
    (out, h) = self.lstm(x.transpose(0, 1), self.h)
    out = self.linear(out)
    if (not self.training):
        self.h = h
    return out
def forward(self, x):
    if self.training:
        self.h = None
    (out, h) = self.lstm(x.transpose(0, 1), self.h)
    out = self.linear(out)
    if (not self.training):
        self.h = h
    return out