image-analogies
image-analogies copied to clipboard
Flip the filter for finding matched patch
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!
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