Skip to content

Instantly share code, notes, and snippets.

@irdanish11
Created July 8, 2020 11:12
Show Gist options
  • Select an option

  • Save irdanish11/8c0edadeefed030df5495638e41ddcf8 to your computer and use it in GitHub Desktop.

Select an option

Save irdanish11/8c0edadeefed030df5495638e41ddcf8 to your computer and use it in GitHub Desktop.
g = tf.Graph()
with g.as_default():
a = tf.constant([[10,10],[11.,1.]])
x = tf.constant([[1.,0.],[0.,1.]])
b = tf.Variable(12.)
y = tf.matmul(a, x) + b
init_op = tf.global_variables_initializer()
with tf.Session() as sess:
sess.run(init_op)
print(sess.run(y))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment