def setUp(self):
        skip_if_no_gpu()
        if not dnn_available():
            raise SkipTest('Skipping tests cause cudnn is not available')
        self.orig_floatX = theano.config.floatX
        theano.config.floatX = 'float32'
        self.image = np.random.rand(1, 1, 3, 3).astype(theano.config.floatX)
        self.image_tensor = tensor.tensor4()
        self.input_space = Conv2DSpace((3, 3), 1, axes=('b', 'c', 0, 1))
        self.filters_values = np.ones(
            (1, 1, 2, 2), dtype=theano.config.floatX
        )
        self.filters = sharedX(self.filters_values, name='filters')
        self.batch_size = 1

        self.cudnn2d = Cudnn2D(self.filters, self.batch_size, self.input_space)
Set up a test image and filter to re-use.
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/linear/tests/test_cudnn.py/TestCudnn.setUp