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

miss bias in the first layer of the discriminator #13

Open
udibr opened this issue Dec 4, 2015 · 3 comments
Open

miss bias in the first layer of the discriminator #13

udibr opened this issue Dec 4, 2015 · 3 comments

Comments

@udibr
Copy link

udibr commented Dec 4, 2015

referring to https://github.com/Newmu/dcgan_code/blob/master/faces/train_uncond_dcgan.py#L118
I tried adding my own bias just before the lrelu, but it is hard to tell if it helps:

b = bias_ifn((ndf), 'db')
...
h = lrelu(dnn_conv(X, w, subsample=(2, 2), border_mode=(2, 2))+b.dimshuffle('x', 0, 'x', 'x'))
@axzml
Copy link

axzml commented Oct 11, 2016

@udibr , I have some thoughts but I don't know whether they are correct.

Before using dnn_conv(X, w, subsample = (2, 2), border_mode=(2, 2)), the author used X = conv_cond_concat(X, yb),
but in the deep learning tutorial ( http://deeplearning.net/tutorial/lenet.html#lenet ), X, the input, needs not to concatenate with yb. Meanwhile, yb has a special structure, so when we use dnn_conv(X, w, subsample = (2, 2), border_mode=(2, 2)), the result is something like conv(X1, w) + b.dimshuffle('x', 0, 'x', 'x'), here X1 is not concatenate with yb.

@udibr
Copy link
Author

udibr commented Oct 11, 2016

I am guessing the two ways of adding bias are equivalent. But if you search for conv_cond_concat you only find it in the mnist model so it is missing from the faces model. Perhaps there is a reason

@axzml
Copy link

axzml commented Oct 12, 2016

Thank you for rereading the code. I find that in the faces model the batchnorm function is used with a bias parameter. However bias is still missing in some layers, like in discrim model, line 118.

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

2 participants