AvgPool3d

class dragon.vm.torch.nn.AvgPool3d(
  kernel_size,
  stride=1,
  padding=0,
  ceil_mode=False
)[source]

Apply the 3d average pooling.

This module excepts the input size \((N, C, D, H, W)\), and output size is \((N, C, D_{\text{out}}, H_{\text{out}}, W_{\text{out}})\), where \(N\) is the batch size, \(C\) is the number of channels, \(D\), \(H\) and \(W\) are the depth, height and width of data.

Examples:

m = torch.nn.AvgPool3d(2, 2)
x = torch.ones(2, 2, 2, 2, 2)
y = m(x)

__init__

AvgPool3d.__init__(
  kernel_size,
  stride=1,
  padding=0,
  ceil_mode=False
)[source]

Create a AvgPool3d module.

Parameters:
  • kernel_size (Union[int, Sequence[int]]) – The size of pooling window.
  • stride (Union[int, Sequence[int]], optional, default=1) – The stride of pooling window.
  • padding (Union[int, Sequence[int]], optional, default=0) – The zero padding size.
  • ceil_mode (bool, optional, default=False) – Ceil or floor the boundary.