def avg_pool1d(input, kernel_size, stride=None, padding=0, ceil_mode=False, count_include_pad=True):
 if (input.dim() != 3):
  raise ValueError('expected 3D input (got {} dimensions)'.format(input.dim()))
 kernel_size = (_single(kernel_size) + (1,))
 stride = (_single(stride) + (1,))
 padding = (_single(padding) + (0,))
 f = _functions.thnn.AvgPool2d(kernel_size, stride, padding, ceil_mode, count_include_pad)
 return f(input.unsqueeze(3)).squeeze(3)

def avg_pool1d ( input , kernel_size , stride = None , padding = 0 , ceil_mode = False , count_include_pad = True ) : if ( input . dim ( ) != 3 ) : raise ValueError ( 'expected 3D input (got {} dimensions)' . format ( input . dim ( ) ) ) kernel_size = ( _single ( kernel_size ) + ( 1 , ) ) stride = ( _single ( stride ) + ( 1 , ) ) padding = ( _single ( padding ) + ( 0 , ) ) f = _functions . thnn . AvgPool2d ( kernel_size , stride , padding , ceil_mode , count_include_pad ) return f ( input . unsqueeze ( 3 ) ) . squeeze ( 3 )
applies a 1d average pooling over an input signal composed of several input planes .