-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplot.py
More file actions
46 lines (43 loc) · 1.67 KB
/
plot.py
File metadata and controls
46 lines (43 loc) · 1.67 KB
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
from learning import val_accuracy_histories
from learning import train_accuracy_histories
from learning import val_loss_histories
from learning import train_loss_histories
from learning import LEARN_TYPE
from learning import LEARNING_RATE
from learning import HIDDEN_NEURONS_COUNT
from learning import BATCH_SIZE
from learning import LEARNING_ATTEMPTS_COUNT
import matplotlib
from matplotlib import pyplot as plt
# import matplotlib
matplotlib.rcParams['figure.figsize'] = (8, 8)
styles = ( # 'Solarize_Light2',
# '_classic_test_patch',
# '_mpl-gallery',
'bmh',
# 'classic',
# 'dark_background',
# 'seaborn-bright',
# 'tableau-colorblind10'
)
# plt.gca().set_ylim(0, 1)
for style in styles:
matplotlib.style.use(style=style)
for i in range(len(val_accuracy_histories)):
plt.plot(val_accuracy_histories[i], label=f'attempt {i} validation accuracy')
for i in range(len(val_accuracy_histories)):
plt.plot(train_accuracy_histories[i], label=f'attempt {i} train accuracy')
# plt.plot(train_accuracy_history, label=f'{LEARN_TYPE} lr={LEARNING_RATE} train accuracy')
# plt.gca().set_ylim(0.0, 0.2)
# plt.plot(val_loss_history, label=f'{LEARN_TYPE} lr={LEARNING_RATE} val loss');
# plt.plot(train_loss_history, label=f'{LEARN_TYPE} lr={LEARNING_RATE} train loss');
title = f'attempts = {LEARNING_ATTEMPTS_COUNT} ' \
f'neurons = {HIDDEN_NEURONS_COUNT} ' \
f'batch size = {BATCH_SIZE} ' \
f'method = {LEARN_TYPE} ' \
f'learning rate = {LEARNING_RATE} '
plt.title(title)
plt.legend(loc='lower right')
plt.show()
pass
pass