LSTM — PyTorch 2.7 documentation (original) (raw)
class torch.ao.nn.quantized.dynamic.LSTM(*args, **kwargs)[source][source]¶
A dynamic quantized LSTM module with floating point tensor as inputs and outputs. We adopt the same interface as torch.nn.LSTM, please seehttps://pytorch.org/docs/stable/nn.html#torch.nn.LSTM for documentation.
Examples:
rnn = nn.LSTM(10, 20, 2) input = torch.randn(5, 3, 10) h0 = torch.randn(2, 3, 20) c0 = torch.randn(2, 3, 20) output, (hn, cn) = rnn(input, (h0, c0))