Skip to content

Instantly share code, notes, and snippets.

@axegon
Created January 25, 2019 14:43
Show Gist options
  • Select an option

  • Save axegon/a37e9bbb58e462eafb343783d22a94bd to your computer and use it in GitHub Desktop.

Select an option

Save axegon/a37e9bbb58e462eafb343783d22a94bd to your computer and use it in GitHub Desktop.

Revisions

  1. axegon revised this gist Jan 25, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion tf1.py
    Original file line number Diff line number Diff line change
    @@ -9,6 +9,6 @@
    tf.global_variables_initializer()

    with tf.Session() as sess:
    result = sess.run(result)
    result = sess.run(result)

    print(result)
  2. axegon created this gist Jan 25, 2019.
    14 changes: 14 additions & 0 deletions tf1.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    import numpy as np
    import tensorflow as tf

    np.random.seed(42)

    x = tf.constant(np.random.rand(3,3))
    y = tf.constant(np.random.rand(3,3))
    result = tf.matmul(x, y)
    tf.global_variables_initializer()

    with tf.Session() as sess:
    result = sess.run(result)

    print(result)