controlling patch size
eyaler opened this issue · comments
can we allow controlling the patch size explicitly?
Any movement on this?
At the moment, is it a 70x70 discriminator as described in the paper?
The same question. Does a 4-layer 4-spatial filter 2-strides convolution naturally leads to a 70*70 patch discriminator?
Here is visualizer to understand how it works: https://fomoro.com/tools/receptive-fields/#
Explained here: junyanz/pytorch-CycleGAN-and-pix2pix#39
Below is a python script to play around with:
def f(output_size, ksize, stride):
return (output_size - 1) * stride + ksize
last_layer = f(output_size=1, ksize=4, stride=1)
# Receptive field: 4
fourth_layer = f(output_size=last_layer, ksize=4, stride=1)
# Receptive field: 7
third_layer = f(output_size=fourth_layer, ksize=4, stride=2)
# Receptive field: 16
second_layer = f(output_size=third_layer, ksize=4, stride=2)
# Receptive field: 34
first_layer = f(output_size=second_layer, ksize=4, stride=2)
# Receptive field: 70
print(first_layer)
@emilwallner Hello, I think that in the python code, the comment should be input size rather than receptive field. As that in the visualizer link, where there are input size, output size, and receptive field.
has anyone found out how to control the patch-size in the discriminator from Nlayerdiscriminator?
Is there any movement?