📌  相关文章
📜  'float' 对象没有属性 'round' - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:05.340000             🧑  作者: Mango

代码示例1
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)