本文簡要介紹python語言中 torch.nn.quantized.dynamic.GRUCell
的用法。
用法:
class torch.nn.quantized.dynamic.GRUCell(input_size, hidden_size, bias=True, dtype=torch.qint8)
門控循環單元 (GRU) 單元
動態量化 GRUCell 模塊,以浮點張量作為輸入和輸出。權重被量化為 8 位。我們采用與
torch.nn.GRUCell
相同的接口,請參閱https://pytorch.org/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)
相關用法
- Python PyTorch GRUCell用法及代碼示例
- Python PyTorch GRU用法及代碼示例
- Python PyTorch Graph.eliminate_dead_code用法及代碼示例
- Python PyTorch Generator.set_state用法及代碼示例
- Python PyTorch GroupedPositionWeightedModule.named_parameters用法及代碼示例
- Python PyTorch Graph.inserting_before用法及代碼示例
- Python PyTorch GradScaler.unscale_用法及代碼示例
- Python PyTorch Generator.seed用法及代碼示例
- Python PyTorch GroupedPooledEmbeddingsLookup.named_buffers用法及代碼示例
- Python PyTorch GLU用法及代碼示例
- Python PyTorch Graph.inserting_after用法及代碼示例
- Python PyTorch GroupNorm用法及代碼示例
- Python PyTorch GDriveReader用法及代碼示例
- Python PyTorch Gumbel用法及代碼示例
- Python PyTorch Graph用法及代碼示例
- Python PyTorch Generator.get_state用法及代碼示例
- Python PyTorch GELU用法及代碼示例
- Python PyTorch Generator.manual_seed用法及代碼示例
- Python PyTorch Geometric用法及代碼示例
- Python PyTorch GroupedPositionWeightedModule.named_buffers用法及代碼示例
- Python PyTorch GroupedPooledEmbeddingsLookup.state_dict用法及代碼示例
- Python PyTorch GriffinLim用法及代碼示例
- Python PyTorch GroupedPooledEmbeddingsLookup.named_parameters用法及代碼示例
- Python PyTorch Graph.node_copy用法及代碼示例
- Python PyTorch GaussianNLLLoss用法及代碼示例
注:本文由純淨天空篩選整理自pytorch.org大神的英文原創作品 torch.nn.quantized.dynamic.GRUCell。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。