Skip to content

Instantly share code, notes, and snippets.

@RahulBhalley
Last active March 11, 2017 16:42
Show Gist options
  • Save RahulBhalley/34eb85aa595835bf33ae4d7ff5ba7676 to your computer and use it in GitHub Desktop.
Save RahulBhalley/34eb85aa595835bf33ae4d7ff5ba7676 to your computer and use it in GitHub Desktop.
# 2nd feedforward propagation
a_XW_c_w = tf.matmul(a_XW_c, w)
a_XW_c_w_b = tf.add(a_XW_c_w, b)
init = tf.global_variables_initializer()
# Launch the TensorFlow graph session
with tf.Session() as sess:
# initialize all the variables
sess.run(init)
outputs = feedforward()
print('XOR Inputs:')
for i in range(4):
print(sess.run(X[i]))
print('XOR Outputs:')
for i in range(4):
print(sess.run(outputs[i]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment