xlnstorch.csrc.avg_pool1d_forward#
- xlnstorch.csrc.avg_pool1d_forward(x, kernel_size, base, stride, padding, ceil_mode, count_include_pad)#
Perform LNS 1D average pooling.
- Parameters:
x (torch.Tensor) – The input tensor in LNS format (torch.int64).
kernel_size (int) – The size of the pooling kernel.
base (torch.Tensor) – The base for the LNS representation.
stride (int, optional) – The stride of the pooling operation. Defaults to kernel_size if None.
padding (int) – The padding applied to the input tensor.
ceil_mode (bool) – If True, will use ceil instead of floor to compute the output shape.
count_include_pad (bool) – If True, will include the zero-padding in the averaging calculation.
- Returns:
The output tensor in LNS format (torch.int64) after average pooling.
- Return type: