AdaptiveMaxPool3d¶
- class torch.nn.AdaptiveMaxPool3d(output_size, return_indices=False)[源][源]¶
在由多個輸入平面組成的輸入訊號上應用 3D 自適應最大池化。
輸出尺寸為 ,適用於任何輸入大小。輸出特徵的數量等於輸入平面的數量。
- 引數
- 形狀
輸入: 或 。
輸出: 。
示例
>>> # target output size of 5x7x9 >>> m = nn.AdaptiveMaxPool3d((5, 7, 9)) >>> input = torch.randn(1, 64, 8, 9, 10) >>> output = m(input) >>> # target output size of 7x7x7 (cube) >>> m = nn.AdaptiveMaxPool3d(7) >>> input = torch.randn(1, 64, 10, 9, 8) >>> output = m(input) >>> # target output size of 7x9x8 >>> m = nn.AdaptiveMaxPool3d((7, None, None)) >>> input = torch.randn(1, 64, 10, 9, 8) >>> output = m(input)