Answers for "'float' object has no attribute 'round'"

0

'float' object has no attribute 'round'

The problem is that round is a built-in top level function, not a method on floats. Change:

history['test_acc'][-1].round(4)
to:

round(history['test_acc'][-1], 4)
Posted by: Guest on January-11-2022

Code answers related to "'float' object has no attribute 'round'"

Browse Popular Code Answers by Language