-
Notifications
You must be signed in to change notification settings - Fork 25
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
plots don't reproduce on Binder (also tested locally) #19
Comments
Thanks Lukas! I'll try to see what's wrong... (nothing was changed). For the demo you wanted to show, maybe https://github.com/glouppe/notebooks/blob/master/Fair%20classifier%20with%20adversarial%20networks.ipynb would work? (although I do remember bugs with newer versions of Keras) |
One subtle thing I noticed with newer versions of keras is that the argument order in the Is it maybe some kind of sign / transposition problem? The resulting isosurfaces seem horizontal instead of vertical but maybe that’s just chance |
Hello, I am also facing the same issue. Binder does not start, and when running locally, my output differs from the expected. After correcting the order of the arguments in I run the simpler notebook you recommended https://github.com/glouppe/notebooks/blob/master/Fair%20classifier%20with%20adversarial%20networks.ipynb, and after switching the order of parameters in |
I managed to recreate the results. def make_loss_R(lam, n_components):
nc = n_components
def loss(z_true, z_pred):
z_true = K.reshape(z_true, (-1,))
mu, sigma, pi = z_pred[:, :nc], z_pred[:, nc:2*nc], z_pred[:, 2*nc:]
ss = 2*sigma**2
for i in range(nc):
f = pi[:,i]*K.exp(-(z_true-mu[:,i])**2/ss[:,i])/K.sqrt(np.pi*ss[:,i])
out = f if i==0 else out+f
return -K.mean(K.log(out))
return loss I think that TensorFlow has a bug in its design, because if the line that reshapes the 'z_true' parameter is removed, the code appears to be the same and yields the same values when evaluated on random inputs, but during training it behaves differently. |
I wanted to show the Toy notebook to someone as a demo. The non-adversarial training works as expected, but it seems like there is a bug in the adversarial training or the Binder setup.
I see the same problems locally (but I'm mostly repeating the setup of Binder so not sure if that's a useful test)
I briefly skimmed the code and nothing obvious stands out (but I'm not too familiar with the code)
The text was updated successfully, but these errors were encountered: