Skip to content

Instantly share code, notes, and snippets.

@ericjang
Last active December 30, 2015 09:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericjang/33ee2ef334fd833cab85 to your computer and use it in GitHub Desktop.
Save ericjang/33ee2ef334fd833cab85 to your computer and use it in GitHub Desktop.
genadv_algo1
for i in range(TRAIN_ITERS):
x= np.random.normal(mu,sigma,M) # sample minibatch from p_data
z= np.linspace(-5.0,5.0,M)+np.random.random(M)*0.01 # sample minibatch from noise prior
sess.run(opt_d, {x_node: x, z_node: z}) # update discriminator D
z= np.linspace(-5.0,5.0,M)+np.random.random(M)*0.01 # sample noise prior
sess.run(opt_g, {z_node: z}) # update generator G
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment