瀏覽代碼

分析代码

罗俊辉 1 年之前
父節點
當前提交
c9f7d4db41
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      result_analysis.py

+ 2 - 2
result_analysis.py

@@ -16,13 +16,13 @@ def analysis(data):
             true_count += 1
         if int(pred_tag) == 1:
             pred_count += 1
-        if true_tag == pred_tag == 1:
+        if int(true_tag) == int(pred_tag) == 1:
             accuracy_count += 1
         total_count += 1
     print("预测为 1 的数量", pred_count)
     print("实际为 1 的数量", true_count)
     print("预测为 1,实际也为 1 的数量", accuracy_count)
-    print("total_video", true_count)
+    print("total_video", total_count)
 
 
 if __name__ == '__main__':