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

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