You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
你好!在predict.py中,混淆矩阵的初始化 conf_mat = np.zeros((num_classes, num_classes)).astype(np.int64)
写在了循环 for index, data in enumerate(dataloader): 里面
这导致了在测试时每轮batch都会将混淆矩阵归零一次,测试得到的预测数和标签数都没有累加。
同时这也导致了predict最后打印的评估指标其实是最后一轮batch的结果,而非整体的精度。
以上是我个人在运行predict.py时发现的问题,想请教一下作者在提供的代码中是否确实存在问题?谢谢!!!
The text was updated successfully, but these errors were encountered:
你好!在predict.py中,混淆矩阵的初始化
conf_mat = np.zeros((num_classes, num_classes)).astype(np.int64)
写在了循环
for index, data in enumerate(dataloader):
里面这导致了在测试时每轮batch都会将混淆矩阵归零一次,测试得到的预测数和标签数都没有累加。
同时这也导致了predict最后打印的评估指标其实是最后一轮batch的结果,而非整体的精度。
以上是我个人在运行predict.py时发现的问题,想请教一下作者在提供的代码中是否确实存在问题?谢谢!!!
The text was updated successfully, but these errors were encountered: