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 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