From 55bb032ebbae52d6c46ebf111903e8d2d615ba6a Mon Sep 17 00:00:00 2001 From: Akshay Agrawal Date: Mon, 14 May 2018 14:25:55 -0700 Subject: [PATCH] Update the eager programmer's guide to reflect the fact that "==" is not implemented in the natural way for the Tensor class. PiperOrigin-RevId: 196566940 --- tensorflow/docs_src/programmers_guide/eager.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tensorflow/docs_src/programmers_guide/eager.md b/tensorflow/docs_src/programmers_guide/eager.md index 5926e9f..9719858 100644 --- a/tensorflow/docs_src/programmers_guide/eager.md +++ b/tensorflow/docs_src/programmers_guide/eager.md @@ -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) -- 2.7.4