So, looking at the docs I believe I did. Because the docs says nnet.conv2d
will be replaced by CorrMM. Initial experiments show that their
performances are close. I need to play with filter size and number of
filters to get a more conclusive idea of the winner. Theoretically fft
should make more sense as the size of the image increases.

One thing that I am not sure using the fft is if it is leveraging full
multi-threaded power of the framework that it is working on. That is why, I
am currently trying to understand fft speed independent of theano.

Cha.

On Wed, Apr 19, 2017 at 1:59 PM, Frédéric Bastien <
[email protected]> wrote:

> Did you speed compare it to CorrMM implementation?
>
> Fred
>
> On Tue, Apr 18, 2017 at 11:49 AM <[email protected]> wrote:
>
>> I was able to pull that out. I may post later my solution if anybody is
>> interested.
>>
>> Best,
>> Cha.
>>
>>
>> On Monday, April 17, 2017 at 2:17:20 PM UTC-4, [email protected] wrote:
>>>
>>> Hi,
>>>
>>> I want to perform a convolution operation using fft. My filter and image
>>> are same size i.e (nb_channel, nb_row, nb_col). Numpy version of what I
>>> would like to do is below.
>>>
>>>
>>> def conv2dfft_op(input, filter):
>>>     '''
>>>     Parameters
>>>     ----------
>>>     input: symbolic 3D tensor of shape
>>>         (stack size, nb row, nb col)
>>>     filter: symbolic 3D tensor of shape
>>>         (stack size, nb row, nb col)
>>>     '''
>>>
>>>     # initialize the accumulator
>>>     conv_out = np.zeros(input.shape[1:]).astype('float32')
>>>
>>>     # go over each channel and perform 2d convolution
>>>     for in_channel,f_channel in zip(input,filter):
>>>         # accumulate the result
>>>         conv_out += np.fft.irfft2(np.fft.rfft2(in_
>>> channel)*np.fft.rfft2(f_channel))
>>>     return conv_out
>>>
>>>
>>> I would appreciate if anyone can help me to write an efficient Theano
>>> version.
>>>
>>> Best,
>>> Cha.
>>>
>> --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "theano-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "theano-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/theano-users/Z39lZXSQ9vA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to