本文簡要介紹python語言中 torch.quantized_max_pool2d
的用法。
用法:
torch.quantized_max_pool2d(input, kernel_size, stride=[], padding=0, dilation=1, ceil_mode=False) → Tensor
應用了max_pool2d 的量化張量。
在由多個輸入平麵組成的輸入量化張量上應用 2D 最大池化。
例子:
>>> qx = torch.quantize_per_tensor(torch.rand(2, 2, 2, 2), 1.5, 3, torch.quint8) >>> torch.quantized_max_pool2d(qx, [2,2]) tensor([[[[1.5000]], [[1.5000]]], [[[0.0000]], [[0.0000]]]], size=(2, 2, 1, 1), dtype=torch.quint8, quantization_scheme=torch.per_tensor_affine, scale=1.5, zero_point=3)
參數:
返回:
返回類型:
相關用法
- Python PyTorch quantized_max_pool1d用法及代碼示例
- Python PyTorch quantized_batch_norm用法及代碼示例
- Python PyTorch quantize_per_tensor用法及代碼示例
- Python PyTorch quantize_per_channel用法及代碼示例
- Python PyTorch quantile用法及代碼示例
- Python PyTorch qr用法及代碼示例
- Python PyTorch frexp用法及代碼示例
- Python PyTorch jvp用法及代碼示例
- Python PyTorch cholesky用法及代碼示例
- Python PyTorch vdot用法及代碼示例
- Python PyTorch ELU用法及代碼示例
- Python PyTorch ScaledDotProduct.__init__用法及代碼示例
- Python PyTorch gumbel_softmax用法及代碼示例
- Python PyTorch get_tokenizer用法及代碼示例
- Python PyTorch saved_tensors_hooks用法及代碼示例
- Python PyTorch positive用法及代碼示例
- Python PyTorch renorm用法及代碼示例
- Python PyTorch AvgPool2d用法及代碼示例
- Python PyTorch MaxUnpool3d用法及代碼示例
- Python PyTorch Bernoulli用法及代碼示例
- Python PyTorch Tensor.unflatten用法及代碼示例
- Python PyTorch Sigmoid用法及代碼示例
- Python PyTorch Tensor.register_hook用法及代碼示例
- Python PyTorch ShardedEmbeddingBagCollection.named_parameters用法及代碼示例
- Python PyTorch sqrt用法及代碼示例
注:本文由純淨天空篩選整理自pytorch.org大神的英文原創作品 torch.quantized_max_pool2d。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。