def dnn_pool(img, ws, stride=(1, 1), mode='max', pad=(0, 0)):
    img = gpu_contiguous(img)
    return GpuDnnPool(mode=mode)(img, ws, stride, pad)
GPU pooling using cuDNN from NVIDIA.
dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/sandbox/cuda/dnn.py/dnn_pool