def convolution_nd(x, W, b=None, stride=1, pad=0, use_cudnn=True, cover_all=False):
 ndim = len(x.shape[2:])
 func = ConvolutionND(ndim, stride, pad, use_cudnn, cover_all)
 if (b is None):
  return func(x, W)
 else:
  return func(x, W, b)

def convolution_nd ( x , W , b = None , stride = 1 , pad = 0 , use_cudnn = True , cover_all = False ) : ndim = len ( x . shape [ 2 : ] ) func = ConvolutionND ( ndim , stride , pad , use_cudnn , cover_all ) if ( b is None ) : return func ( x , W ) else : return func ( x , W , b )
n-dimensional convolution function .