AdaptiveAvgPool1d

class dragon.vm.torch.nn.AdaptiveAvgPool1d(output_size)[source]

Apply the 1d adaptive average pooling.

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

Examples:

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

__init__

AdaptiveAvgPool1d.__init__(output_size)[source]

Create a AdaptiveAvgPool1d module.

Parameters:
  • output_size (Union[int, Sequence[int]]) – The target output size.