Skip to content

Instantly share code, notes, and snippets.

@vrjkmr
Created September 4, 2017 03:04
Show Gist options
  • Save vrjkmr/0351d534ddc9de8ba616fe71a79ab374 to your computer and use it in GitHub Desktop.
Save vrjkmr/0351d534ddc9de8ba616fe71a79ab374 to your computer and use it in GitHub Desktop.
# Create placeholders
def create_placeholders(n_x, n_y):
'''
Creates the placeholders for the tensorflow session.
Arguments:
n_x -- scalar, size of an image vector (28*28 = 784)
n_y -- scalar, number of classes (10)
Returns:
X -- placeholder for the data input, of shape [n_x, None] and dtype "float"
Y -- placeholder for the input labels, of shape [n_y, None] and dtype "float"
'''
X = tf.placeholder(tf.float32, [n_x, None], name=”X”)
Y = tf.placeholder(tf.float32, [n_y, None], name=”Y”)
return X, Y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment