-
Notifications
You must be signed in to change notification settings - Fork 3
/
plot_data.py
26 lines (23 loc) · 1.19 KB
/
plot_data.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
import matplotlib.pyplot as plt
def plot():
acc = [0.32242481362475717, 0.32285842489055311, 0.3233393069051701, 0.32403912711054011, 0.32399789855887345, 0.32414895161870999, 0.32423069800481591, 0.32468136940872394, 0.32453031628002676]
val_acc = [0.33180226532592111, 0.3315089001183662, 0.33156262685696808, 0.33151941809069374, 0.33153931686175919, 0.33156063696373023, 0.33158110433123572, 0.33162232326298224, 0.33155751007191459]
loss = [1.3817114148933005, 1.3811089785200259, 1.3809971892243675, 1.3807272857521276, 1.3807931155966058, 1.3804756166172676, 1.3805718419726902, 1.3803610765595629, 1.3803601310674276]
val_loss = [1.3685030752409242, 1.3685072162540499, 1.3685067427963522, 1.368506762708553, 1.3684559067619675, 1.3684728297842823, 1.3684785637824217, 1.3684792577661224, 1.3684874292408549]
plt.plot(acc)
plt.plot(val_acc)
plt.title('model accuracy')
plt.ylabel('accuracy')
plt.xlabel('epoch')
plt.legend(['train', 'test'], loc='upper left')
plt.show()
# summarize history for loss
plt.plot(loss)
plt.plot(val_loss)
plt.title('model loss')
plt.ylabel('loss')
plt.xlabel('epoch')
plt.legend(['train', 'test'], loc='upper left')
plt.show()
if __name__ == '__main__':
plot()