pix2pix-tensorflow icon indicating copy to clipboard operation
pix2pix-tensorflow copied to clipboard

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

Open seungwooYoo opened this issue 9 years ago • 10 comments

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,

seungwooYoo avatar Nov 27 '16 14:11 seungwooYoo

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

yenchenlin avatar Nov 27 '16 14:11 yenchenlin

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?

yenchenlin avatar Nov 30 '16 03:11 yenchenlin

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

seungwooYoo avatar Dec 04 '16 06:12 seungwooYoo

@seungwooYoo thanks.

yenchenlin avatar Dec 04 '16 06:12 yenchenlin

@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

seungwooYoo avatar Dec 06 '16 00:12 seungwooYoo

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

yenchenlin avatar Dec 07 '16 17:12 yenchenlin

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

seungwooYoo avatar Dec 09 '16 04:12 seungwooYoo

original pix2pix implementation does not have bn on last convolution

eyaler avatar Jan 17 '17 16:01 eyaler

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

eyaler avatar Jan 17 '17 16:01 eyaler