Or rather + (1 - shape % 2)


On Thu, May 22, 2014 at 3:29 PM, David Warde-Farley <
d.warde.farley@gmail.com> wrote:

> + shape % 2?
>
>
> On Thu, May 22, 2014 at 3:27 PM, abergeron <notifications@github.com>wrote:
>
>> In theano/sandbox/cuda/tests/test_fftconv.py:
>>
>> > +
>> > +        inputs_val = numpy.random.random(inputs_shape).astype('float32')
>> > +        filters_val = numpy.random.random(filters_shape).astype('float32')
>> > +
>> > +        inputs = shared(inputs_val)
>> > +        filters = shared(filters_val)
>> > +
>> > +        conv = theano.tensor.nnet.conv.conv2d(inputs, filters)
>> > +
>> > +        f_ref = theano.function([], conv)
>> > +        f_fft = theano.function([], conv, mode=mode_with_gpu)
>> > +
>> > +        res_ref = f_ref()
>> > +        res_fft = f_fft()
>> > +
>> > +        numpy.testing.assert_allclose(res_ref, res_fft)
>>
>> No we can't. At least not without introducing an ifelse or a switch which
>> you told us was too slow.
>>
>> —
>> Reply to this email directly or view it on GitHub<https://github.com/Theano/Theano/pull/1870/files#r12969297>
>> .
>>
>
>