model.predict_on_batch(training_data['inputs']).round(1)
– After running this line of code I’m getting this error
'tensorflow.python.framework.ops.EagerTensor' object has no attribute 'round'
Hi Mohib,
I believe this might be an issue for older versions of tensorflow and eager execution.
You could try:
import tensorflow as tf
tf.enable_eager_execution()
Just to make sure to restart your Kernel.
Otherwise you might want to upgade tensorflow with
pip install tensorflow –upgrade
Hope this helps!
Best,
Eli
Hi Eli & team, i’m receiving the same error message at the same stage. I checked which version of tensorflow is being used and it’s 2.1.0. But the problem still persists. Running the code tf.enable_eager_execution() gives an error as expected.
Hi !
If you are using python 3.7 and tensorflow 2.0 this is an alternate way to display the same
x=model.predict_on_batch(training_data[‘inputs’])
arr=np.array(x)
arr.round(1)
You store it in an array and there you go!
Hope this helped!