Created
March 11, 2020 21:15
-
-
Save sol0invictus/168ddbec79ff142687c3136cd934b249 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sigmoid(z): | |
# Create a placeholder for x. Name it 'x'. | |
x = tf.placeholder(tf.float32, name = "x") | |
# compute sigmoid(x) | |
sigmoid = tf.sigmoid(x) | |
# Create a session, and run it. Please use the method 2 explained above. | |
# You should use a feed_dict to pass z's value to x. | |
with tf.Session() as sess: | |
# Run session and call the output "result" | |
result = sess.run(sigmoid, feed_dict = {x: z}) | |
return result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment