Skip to content

Instantly share code, notes, and snippets.

@yaroslavvb2
Last active November 1, 2017 03:27
Show Gist options
  • Save yaroslavvb2/440ea9a6c01c84b9ed8a2ca8f5762946 to your computer and use it in GitHub Desktop.
Save yaroslavvb2/440ea9a6c01c84b9ed8a2ca8f5762946 to your computer and use it in GitHub Desktop.
pip install tf-nightly-gpu
python
from tensorflow.contrib.eager.python import tfe
tfe.enable_eager_execution()
a = tf.random_uniform((10,))
b = tf.random_uniform((10,))
for i in range(100):
  a = a*a
  if a[0]>b[0]:
  break
print(i)
@weakish
Copy link

weakish commented Nov 1, 2017

Before from tensorflow.contrib.eager.python import tfe, did you forget to import tensorflow as tf?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment