Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The difference between your paper and your implementations #120

Closed
iRmantou opened this issue Nov 30, 2017 · 4 comments
Closed

The difference between your paper and your implementations #120

iRmantou opened this issue Nov 30, 2017 · 4 comments

Comments

@iRmantou
Copy link

iRmantou commented Nov 30, 2017

Hello, @junyanz :
I have read your paper and browsed your website.I found some difference among your implementations.

A approach: Your Torch and Pytorch implementations and Tensorflow versions implemented by Christopher Hesse and Yen-Chen Lin. All of them use the same architecture, for example: C64-C128-C256-C512 (n_layers = 3), which has the input of the whole images!

B approach: Keras implemented by Thibault de Boissiere has the same architecture as above but divide the whole images into N patches with the shape of 70×70 (210×210 image would be divide into 9 patches) which is your default setting in paper and the network's input is a single patch image!

So, I am confused which is your original purpose, and the most important I hope to know: different patch size Discriminators are only different in network architectures or in network input shapes either, like Keras implement

@phillipi
Copy link
Owner

Hi @iRmantou,

Both approaches are, in fact, mathematically the same! (assuming proper setting of parameters, in reality they likely differ slightly) The A approach is a fully-convolutional network, where the output neurons have receptive fields that are 70x70 patches over the input image. This is equivalent to chopping up the input into 70x70 patches explicitly, and feeding each one into a smaller network, whose output is a single scalar. Some more discussion of this equivalence is here: junyanz/pytorch-CycleGAN-and-pix2pix#39

I like the fully-convolutional approach since it is more efficient (it shares computation between adjacent overlapping patches). I haven't looks at the Keras implementation you mention though, so there may be good reasons why they chose to explicitly chop up the image.

@iRmantou
Copy link
Author

Thank you!!I understand!

@pfabreu
Copy link

pfabreu commented May 31, 2018

Could you please provide a link to Thibault de Boissiere's implementation please?

@iRmantou
Copy link
Author

@Pedro-Abreu you could see all types of codes in here [https://phillipi.github.io/pix2pix/]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants