-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlayout.py
73 lines (66 loc) · 1.77 KB
/
layout.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import PySimpleGUI as sg
"""This module contains only the layout to be used to create the GUI using pysimplegui.
It is nothing more that a set of widgets positioned in the window."""
config_names_layout = [
[sg.Text("Network type:")],
[sg.Text("Optimizer:")],
[sg.Text("Hidden units:")],
[sg.Text("Weight decay:")],
[sg.Text("Dropout:")],
[sg.Text("Batch size:")],
[sg.Text("Learning rate:")],
[sg.Text("Device:")]
]
config_elements_layout = [
[
sg.Radio("Shallow MLP", "net_type", True),
sg.Radio("Deep MLP", "net_type"),
sg.Radio("Shallow CNN", "net_type"),
sg.Radio("Deep CNN", "net_type")
],
[
sg.Radio("Stochastic Gradient Descent (SGD)", "optimizer", True),
sg.Radio("Adam", "optimizer")
],
[sg.Input("1000")],
[sg.Input("0.0")],
[sg.Input("0.0")],
[sg.Input("128")],
[sg.Input("0.001")],
[
sg.Radio("CPU", "device", True),
sg.Radio("GPU 0", "device"),
sg.Radio("GPU 1", "device")
],
[sg.Checkbox("Save plot", default=False)],
[sg.Checkbox("Save model", default=False)],
[sg.Button("START", key="START")]
]
config_layout = [
[
sg.Column(config_names_layout, vertical_alignment="t"),
sg.Column(config_elements_layout, vertical_alignment="t")
]
]
plot_layout = [
[
sg.Column([
[sg.Canvas(key="-CANVAS1-")],
[sg.Canvas(key="-CANVAS2-")]
], size=(180, 30), key="Column", expand_x=True, expand_y=True, scrollable=True, vertical_scroll_only=True)
]
]
terminal_layout = [
[sg.Output(size=(80, 24))]
]
layout = [
[
sg.Column(config_layout),
sg.VSeperator(),
sg.Column(terminal_layout)
],
[
sg.HSeparator()
],
plot_layout
]