def pool_dnn(bc01, pool_shape, pool_stride, mode='max'):
 assert (mode in ['max', 'mean'])
 if (mode == 'mean'):
  raise NotImplementedError('Mean pooling is not implemented in Pylearn2 using cuDNN as of January 19th, 2015.')
 mx = dnn_pool(bc01, tuple(pool_shape), tuple(pool_stride), mode)
 return mx

def pool_dnn ( bc01 , pool_shape , pool_stride , mode = 'max' ) : assert ( mode in [ 'max' , 'mean' ] ) if ( mode == 'mean' ) : raise NotImplementedError ( 'Mean pooling is not implemented in Pylearn2 using cuDNN as of January 19th, 2015.' ) mx = dnn_pool ( bc01 , tuple ( pool_shape ) , tuple ( pool_stride ) , mode ) return mx
cudnn pooling op .