Last answered:

23 Apr 2020

Posted on:

12 Apr 2020

0

Error faced while extracting outputs

model.predict_on_batch(training_data['inputs']).round(1) gives error
AttributeError: 'tensorflow.python.framework.ops.EagerTensor' object has no attribute 'round'

I have tried restarting the kernel and also updated TensorFlow to v2.1.0. I also have tried adding eager execution.

But,as the method is automatic in TF2,it throws up another error.

1 answers ( 0 marked as helpful)
Instructor
Posted on:

23 Apr 2020

0
Hi Manav, Thanks for reaching out to us. In order to use round on tensors of TensorFlow 2.1, we need to get their numpy arrays: model.predict_on_batch(training_data['inputs']).numpy().round(1) Best,
The 365 Team

Submit an answer