yenchenlin / pix2pix-tensorflow

TensorFlow implementation of "Image-to-Image Translation Using Conditional Adversarial Networks".
MIT License
939 stars 300 forks source link

Add conv layer instead of linear layer to meet the original paper #1

Open seungwooYoo opened 7 years ago

seungwooYoo commented 7 years ago

Hi,

Thanks for sharing the codes of Image-to-Image Translation with CGAN.

I found that the last layer of discriminator network consists of linear layer instead of conv layer, which is written in the appendix of original paper (Appendix 5.1.2) :

After the last layer, a convolution is applied to map to a 1 dimensional output, followed by a Sigmoid function.

I changed a little of your implementation to meet the original ones. If my suggestion seems not correct, then do not care about the pull request. Thanks,

yenchenlin commented 7 years ago

You are correct, I'll test this and then merge it if it works.

yenchenlin commented 7 years ago

Hello @seungwooYoo , I've tried the code in this PR and also try to enhance the discriminator to 6-layer. However, the results seems more blurry than before. How is the result on your side using code in this PR?

seungwooYoo commented 7 years ago

Actually, I haven't compared with the previous codes. I'll test and tell you the differences.

yenchenlin commented 7 years ago

@seungwooYoo thanks.

seungwooYoo commented 7 years ago

@yenchenlin It seems that the result is little bit much blurred than before. Seems like cGAN is not working well when compared with Figure 4. Do you have any idea to solve that issue ? I'll retest using L1 penalty as zero and see the results after optimization which meet the example of figure 4. image image

yenchenlin commented 7 years ago

No, I haven't come out a solution yet 😞 Please let me know if you do.

seungwooYoo commented 7 years ago

@yenchenlin Yes I will. I'll test some ideas in the following weekend :)

eyaler commented 7 years ago

original pix2pix implementation does not have bn on last convolution

nightrome commented 7 years ago

Neither does this... https://github.com/yenchenlin/pix2pix-tensorflow/blob/master/model.py#L280 https://github.com/yenchenlin/pix2pix-tensorflow/blob/master/model.py#L211

eyaler commented 7 years ago

also the you are missing the args: d_h=1, d_w=1