From: Akshay Agrawal Date: Mon, 14 May 2018 21:25:55 +0000 (-0700) Subject: Update the eager programmer's guide to reflect the fact that "==" is not X-Git-Tag: upstream/v1.9.0_rc1~116^2^2~42 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=55bb032ebbae52d6c46ebf111903e8d2d615ba6a;p=platform%2Fupstream%2Ftensorflow.git 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 --- 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)