You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that the function generateZ in MNIST_SlicedWassersteinAutoEncoder_Circle.ipynb does not generate sample points in a circle uniformly.
The generated sample points are more dense at the center of a circle. This can affect the resulting latent space.
It can be easily fixed by applying sqrt on random radius samples from a uniform distribution.
defgenerateZ(batchsize):
# This function generates 2D samples from a `circle' distribution in # a 2-dimensional space# r=np.random.uniform(size=(batchsize)) # beforer=np.sqrt(np.random.uniform(size=(batchsize))) # aftertheta=2*np.pi*np.random.uniform(size=(batchsize))
x=r*np.cos(theta)
y=r*np.sin(theta)
z_=np.array([x,y]).Treturnz_
Hi,
Thank you for sharing the code.
I found that the function
generateZ
inMNIST_SlicedWassersteinAutoEncoder_Circle.ipynb
does not generate sample points in a circle uniformly.The generated sample points are more dense at the center of a circle. This can affect the resulting latent space.
It can be easily fixed by applying
sqrt
on random radius samples from a uniform distribution.Here is an related article: Generate a random point within a circle (uniformly)
Best,
Oh-Hyun
The text was updated successfully, but these errors were encountered: