Python基础
白振峰
机器学习,深度学习(迁移学习、多任务学习、弱监督学习、生成对抗网络)、后端开发、前端开发、嵌入式
展开
-
报错——TypeError: ‘list‘ object is not callable
l列表操作报错TypeError: 'list' object is not callable原创 2022-08-03 13:32:03 · 38182 阅读 · 1 评论 -
TypeError: The view function for ‘login_func‘ did not return a valid response.
Flask返回TypeError原创 2022-07-08 09:59:13 · 1316 阅读 · 0 评论 -
TypeError: The view function did not return a valid response.
在使用Flask写接口的过程中,报错TypeError: The view function did not return a valid response. The return type must be a string, dict, tuple, Response instance, or WSGI callable, but it was a list.原创 2022-07-06 10:38:10 · 3457 阅读 · 0 评论 -
Python--file.write() 记录训练/测试准确率
file_name = "test_acc.txt"output1 = "Test : avg_acc:{:.2f}% avg_acc:{:.2f}%".format((correct1 / len(testloader1.dataset)) * 100,(correct2 / len(testloader2.dataset)) * 100)with open(file_name,"a+") as f: f.write(output1 +'\n') # output是要原创 2020-06-21 09:35:43 · 668 阅读 · 0 评论