Update the eager programmer's guide to reflect the fact that "==" is not
authorAkshay Agrawal <akshayka@google.com>
Mon, 14 May 2018 21:25:55 +0000 (14:25 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Mon, 14 May 2018 21:28:21 +0000 (14:28 -0700)
implemented in the natural way for the Tensor class.

PiperOrigin-RevId: 196566940

tensorflow/docs_src/programmers_guide/eager.md

index 5926e9f..9719858 100644 (file)
@@ -120,11 +120,11 @@ def fizzbuzz(max_num):
   counter = tf.constant(0)
   for num in range(max_num):
     num = tf.constant(num)
-    if num % 3 == 0 and num % 5 == 0:
+    if int(num % 3) == 0 and int(num % 5) == 0:
       print('FizzBuzz')
-    elif num % 3 == 0:
+    elif int(num % 3) == 0:
       print('Fizz')
-    elif num % 5 == 0:
+    elif int(num % 5) == 0:
       print('Buzz')
     else:
       print(num)