Skip to content

Instantly share code, notes, and snippets.

@simoninithomas
Created March 7, 2018 09:20
Show Gist options
  • Save simoninithomas/7b9037f025361e8b1a6367abf028ac25 to your computer and use it in GitHub Desktop.
Save simoninithomas/7b9037f025361e8b1a6367abf028ac25 to your computer and use it in GitHub Desktop.
Cat DCGAN
def model_inputs(real_dim, z_dim):
"""
Create the model inputs
:param real_dim: tuple containing width, height and channels
:param z_dim: The dimension of Z
:return: Tuple of (tensor of real input images, tensor of z data, learning rate G, learning rate D)
"""
# inputs_real for Discriminator
inputs_real = tf.placeholder(tf.float32, (None, *real_dim), name='inputs_real')
# inputs_z for Generator
inputs_z = tf.placeholder(tf.float32, (None, z_dim), name="input_z")
# Two different learning rate : one for the generator, one for the discriminator
learning_rate_G = tf.placeholder(tf.float32, name="learning_rate_G")
learning_rate_D = tf.placeholder(tf.float32, name="learning_rate_D")
return inputs_real, inputs_z, learning_rate_G, learning_rate_D
@MrDNA2018
Copy link

inputs_real = tf.placeholder(tf.float32, (None, *real_dim), name='input_real')
^
SyntaxError: invalid syntax

Why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment