快捷方式

GRUCell

class torch.ao.nn.quantized.dynamic.GRUCell(input_size, hidden_size, bias=True, dtype=torch.qint8)[原始碼][原始碼]

門控迴圈單元 (GRU) Cell

一個動態量化的 GRUCell 模組,輸入和輸出為浮點張量。權重被量化為 8 位。我們採用與 torch.nn.GRUCell 相同的介面,請參閱 https://pytorch.com.tw/docs/stable/nn.html#torch.nn.GRUCell 獲取文件。

示例

>>> rnn = nn.GRUCell(10, 20)
>>> input = torch.randn(6, 3, 10)
>>> hx = torch.randn(3, 20)
>>> output = []
>>> for i in range(6):
...     hx = rnn(input[i], hx)
...     output.append(hx)

文件

查閱 PyTorch 全面的開發者文件

檢視文件

教程

獲取面向初學者和高階開發者的深度教程

檢視教程

資源

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

檢視資源