-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathgraph_sample.py
23 lines (20 loc) · 868 Bytes
/
graph_sample.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import json
import matplotlib.pyplot as plt
import seaborn as sns
if __name__ == "__main__":
with open('training_binary_sample_400.json') as f:
training_400_binary = json.load(f)
with open('training_1_400_subclass.json') as f:
training_400_subclass = json.load(f)
ax = plt.figure(figsize=(20, 20))
sns.set(font_scale=2)
sns.lineplot(range(0, len(training_400_binary['loss'])), training_400_binary['loss'], linestyle='-', linewidth=3,
label="400X BINARY")
g = sns.lineplot(range(0, len(training_400_subclass['loss'])), training_400_subclass['loss'], linestyle='-',
linewidth=3,
label="400X SUBCLASS")
plt.xlabel('Epoch')
plt.ylabel('Loss')
plt.ylim(0, 0.02)
plt.title('Loss values on main classes')
plt.savefig('loss-comparing.svg', format='svg')