-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplot.py
46 lines (31 loc) · 975 Bytes
/
plot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
legends = ['DS-RNN FoV=360', '']
# add more training curves by directory name here!
log_list = [pd.read_csv("data/example_model/progress.csv"),
]
logDicts = {}
for i in range(len(log_list)):
logDicts[i] = log_list[i]
graphDicts={0:'eprewmean', 1:'loss/value_loss'}
legendList=[]
# summarize history for accuracy
# for each metric
for i in range(len(graphDicts)):
plt.figure(i)
plt.title(graphDicts[i])
j = 0
for key in logDicts:
if graphDicts[i] not in logDicts[key]:
continue
else:
plt.plot(logDicts[key]['misc/total_timesteps'],logDicts[key][graphDicts[i]])
legendList.append(legends[j])
print('avg', str(key), graphDicts[i], np.average(logDicts[key][graphDicts[i]]))
j = j + 1
print('------------------------')
plt.xlabel('total_timesteps')
plt.legend(legendList, loc='lower right')
legendList=[]
plt.show()