File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change 10
10
import matplotlib .pyplot as plt
11
11
import numpy as np
12
12
13
- #file = 'result/first/test_A_2 .csv'
14
- file = 'result/tf2 /A_1.csv'
13
+ #file = 'result/torch/test_A_1 .csv'
14
+ # file = 'result/tf6 /A_1.csv'
15
15
#file = 'result/val_1.csv'
16
16
#file = 'result/test_A_1.csv'
17
+ #file = 'result/me/test_A_1.csv'
18
+ file = 'result/me2/152test_A_1.csv'
19
+
20
+ #KK = '30'
21
+ #name = 'test'#val, test
22
+ #file = ('result/tf6_%s/A_1_%s.csv' %(name,KK))
17
23
18
24
df = pd .read_csv (file , header = None )
19
25
@@ -74,4 +80,12 @@ def post_process(p):
74
80
plt .hist (df_max [2 ], bins = 'auto' ) # arguments are passed to np.histogram
75
81
plt .show ()
76
82
df_max [3 ] = np .log (df_max [2 ])
77
- print (- df_max [3 ].sum ()/ len (df_max ))
83
+ print (- df_max [3 ].sum ()/ len (df_max ))
84
+
85
+ # 计算val的loss
86
+ #if 'val' in file:
87
+ # df
88
+
89
+ # 统计预测类别的分布, 与txt2csv类似
90
+ freq = df .sort_values (2 , ascending = False ).drop_duplicates ([0 ])
91
+ plt .hist (freq [1 ], bins = 30 ) # arguments are passed to np.histogram
You can’t perform that action at this time.
0 commit comments