快捷方式

LSTM¶

class torch.ao.nn.quantized.dynamic.LSTM(*args, **kwargs)[source][source]

一個動態量化 LSTM 模組,輸入和輸出均為浮點張量。我們採用與 torch.nn.LSTM 相同的介面,更多文件請參見 https://pytorch.com.tw/docs/stable/nn.html#torch.nn.LSTM

示例

>>> 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))

文件

查閱 PyTorch 的全面開發者文件

檢視文件

教程

獲取針對初學者和高階開發者的深入教程

檢視教程

資源

查詢開發資源並獲得問題解答

檢視資源