def average_pooling_nd(x, ksize, stride=None, pad=0, use_cudnn=True):
 ndim = len(x.shape[2:])
 return AveragePoolingND(ndim, ksize, stride=stride, pad=pad, use_cudnn=use_cudnn)(x)

def average_pooling_nd ( x , ksize , stride = None , pad = 0 , use_cudnn = True ) : ndim = len ( x . shape [ 2 : ] ) return AveragePoolingND ( ndim , ksize , stride = stride , pad = pad , use_cudnn = use_cudnn ) ( x )
n-dimensionally spatial average pooling function .