捷徑

LSTM

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

一個動態量化 LSTM 模組,具有浮點 tensor 作為輸入和輸出。 我們採用與 torch.nn.LSTM 相同的介面,請參閱 https://pytorch.dev.org.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 的完整開發者文件

查看文件

教學

取得適用於初學者和進階開發者的深入教學

查看教學

資源

尋找開發資源並獲得您的問題解答

查看資源