📜  lstm pytorch 文档 - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:08.045000             🧑  作者: Mango

代码示例1
>>> 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))