image-analogies icon indicating copy to clipboard operation
image-analogies copied to clipboard

Flip the filter for finding matched patch

Open Huihui94 opened this issue 8 years ago • 1 comments

In the patches.py file, there is a method called find_patch_matches. I wonder to know why the third and forth dimension of b should be changed to b[:, :, ::-1, ::-1] if convs is None: convs = K.conv2d(a, b[:, :, ::-1, ::-1], border_mode='valid') Thank you so much!

Huihui94 avatar Feb 14 '17 21:02 Huihui94

the filter_flip=True is the default param of conv2d ,which belong to theano.sandbox.cuda.dnn.dnn_conv or theano.tensor.nnet that is latest update to replace dnn

so , conv2d(input,b[:, :, ::-1, ::-1]) is equal to conv2d(input,b,filter_flip=False) where filter_flip is explictly defined to False in func's param .

otherwise ,filter_flip is explained in this_link

gjpicker avatar May 22 '18 08:05 gjpicker