Closed stefdoerr closed 7 years ago
Hey, I noticed a bug in your contour plotting as in this function: https://github.com/igul222/improved_wgan_training/blob/master/gan_toy.py#L163. You have to transpose the height values for the contour using .transpose() i.e. plt.contour(x,y,disc_map.reshape((len(x), len(y))).transpose())
.transpose()
plt.contour(x,y,disc_map.reshape((len(x), len(y))).transpose())
The reason the results look ok for the gaussian toy examples is because they are symmetrical. Try removing a few gaussians from the 8gaussian example like this and see what happens:
elif DATASET == '8gaussians': scale = 2. centers = [ (1,0), #(-1,0), #(0,1), (0,-1), (1./np.sqrt(2), 1./np.sqrt(2)), (1./np.sqrt(2), -1./np.sqrt(2)), #(-1./np.sqrt(2), 1./np.sqrt(2)), #(-1./np.sqrt(2), -1./np.sqrt(2)) ]
This might improve your results on the swiss roll as well since it's not perfectly symmetrical.
Had me scratching my head for a bit on my own unsymmetrical dataset wondering why the controus looked so wrong haha.
Cheers
Good catch!
Hey, I noticed a bug in your contour plotting as in this function: https://github.com/igul222/improved_wgan_training/blob/master/gan_toy.py#L163. You have to transpose the height values for the contour using
.transpose()
i.e.plt.contour(x,y,disc_map.reshape((len(x), len(y))).transpose())
The reason the results look ok for the gaussian toy examples is because they are symmetrical. Try removing a few gaussians from the 8gaussian example like this and see what happens:
This might improve your results on the swiss roll as well since it's not perfectly symmetrical.
Had me scratching my head for a bit on my own unsymmetrical dataset wondering why the controus looked so wrong haha.
Cheers