Created
December 31, 2019 08:30
-
-
Save SuvroBaner/a3b45c61616fe58b525c520f4739f711 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): | |
x = tf.placeholder(tf.float32, name = 'x') # a placeholder tensor (variable) | |
sigmoid = tf.sigmoid(x) # compting sigmoid function of "x" | |
with tf.Session() as sess: | |
result = sess.run(sigmoid, feed_dict = {x : z}) # runnig the computation graph (sigmoid) using a feed_dict | |
return result | |
print(sigmoid(1)) | |
print(sigmoid(10)) | |
print(sigmoid(100)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment