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
Context manager for a PETSc Vec appropriate for this Dat.
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/models/mlp.py/pool_dnn--crossover with--dataset/ETHPy150Open OP2/PyOP2/pyop2/petsc_base.py/MixedDat.vec