快捷方式

Conv3d

torch.ao.nn.quantized.Conv3d(in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros', device=None, dtype=None)[source][source]

對由多個量化輸入平面組成的量化輸入訊號應用 3D 卷積。

有關輸入引數、引數和實現的詳細資訊,請參閱 Conv3d

注意

padding_mode 引數僅支援 zeros

注意

輸入資料型別僅支援 torch.quint8

變數
  • weight (Tensor) – 從可學習的 weight 引數派生的 packed tensor。

  • scale (Tensor) – 輸出 scale 的標量

  • zero_point (Tensor) – 輸出 zero point 的標量

有關其他屬性,請參閱 Conv3d

示例

>>> # With square kernels and equal stride
>>> m = nn.quantized.Conv3d(16, 33, 3, stride=2)
>>> # non-square kernels and unequal stride and with padding
>>> m = nn.quantized.Conv3d(16, 33, (3, 5, 5), stride=(1, 2, 2), padding=(1, 2, 2))
>>> # non-square kernels and unequal stride and with padding and dilation
>>> m = nn.quantized.Conv3d(16, 33, (3, 5, 5), stride=(1, 2, 2), padding=(1, 2, 2), dilation=(1, 2, 2))
>>> input = torch.randn(20, 16, 56, 56, 56)
>>> # quantize input to quint8
>>> q_input = torch.quantize_per_tensor(input, scale=1.0, zero_point=0, dtype=torch.quint8)
>>> output = m(q_input)
類方法 from_float(mod, use_precomputed_fake_quant=False)[source][source]

從 float 模組或 qparams_dict 建立量化模組。

引數

mod (Module) – 一個 float 模組,可由 torch.ao.quantization 工具生成或由使用者提供

文件

查閱 PyTorch 全面的開發者文件

檢視文件

教程

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

檢視教程

資源

查詢開發資源並獲得解答

檢視資源