-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
1082 lines (1028 loc) · 66.4 KB
/
main.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# -*- coding: utf-8 -*-
from PyQt5 import QtCore, QtGui, QtWidgets
from modelCreator import model_creator
class Ui_MainWindow(object):
def __init__(self):
self.intOnly = QtGui.QIntValidator()
def setupUi(self, MainWindow):
MainWindow.setObjectName("ModelCreator")
MainWindow.resize(219, 464)
MainWindow.setStyleSheet("QWidget#centralwidget{ background-color: qlineargradient(spread:pad, x1:0.776577, y1:0.057, x2:1, y2:0.756, stop:0 rgba(34, 49, 63, 255), stop:1 rgba(64, 94, 120, 255));\n"
"}\n"
"\n"
"QPushButton,QComboBox{ background-color: qlineargradient(spread:repeat, x1:50, y1:50, x2:0.94, y2:0.937, stop:0 rgba(65, 94, 121, 255), stop:0.20398 rgba(255, 255, 255, 255), stop:0.850746 rgba(255, 255, 255, 255), stop:1 rgba(71, 102, 131, 255));\n"
"font: 75 8.5pt \"Sitka Small\";\n"
"}\n"
"\n"
"QLabel{ color: rgb(255, 255, 255) }\n"
"\n"
"font: 75 8pt \"Sitka Small\";\n"
" \n"
"")
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.gridLayout = QtWidgets.QGridLayout(self.centralwidget)
self.gridLayout.setContentsMargins(0, 0, 0, 0)
self.gridLayout.setObjectName("gridLayout_4")
self.stackedWidget = QtWidgets.QStackedWidget(self.centralwidget)
self.stackedWidget.setObjectName("stackedWidget")
self.model_page = QtWidgets.QWidget()
self.model_page.setObjectName("model_page")
self.model_gridLayout = QtWidgets.QGridLayout(self.model_page)
self.model_gridLayout.setObjectName("model_gridLayout")
self.model_verticalLayout_1 = QtWidgets.QVBoxLayout()
self.model_verticalLayout_1.setSpacing(10)
self.model_verticalLayout_1.setObjectName("model_verticalLayout_1")
self.model_verticalLayout_2 = QtWidgets.QVBoxLayout()
self.model_verticalLayout_2.setObjectName("model_verticalLayout_2")
self.modelName_label = QtWidgets.QLabel(self.model_page)
self.modelName_label.setObjectName("modelName_label")
self.model_verticalLayout_2.addWidget(self.modelName_label, 0, QtCore.Qt.AlignHCenter)
self.modelName_lineEdit = QtWidgets.QLineEdit(self.model_page)
self.modelName_lineEdit.setMinimumSize(QtCore.QSize(22, 22))
self.modelName_lineEdit.setMaximumSize(QtCore.QSize(125, 22))
self.modelName_lineEdit.setAlignment(QtCore.Qt.AlignCenter)
self.modelName_lineEdit.setObjectName("modelName_lineEdit")
self.model_verticalLayout_2.addWidget(self.modelName_lineEdit, 0, QtCore.Qt.AlignHCenter)
self.model_verticalLayout_1.addLayout(self.model_verticalLayout_2)
self.model_line_1 = QtWidgets.QFrame(self.model_page)
self.model_line_1.setFrameShape(QtWidgets.QFrame.HLine)
self.model_line_1.setFrameShadow(QtWidgets.QFrame.Sunken)
self.model_line_1.setObjectName("model_line_1")
self.model_verticalLayout_1.addWidget(self.model_line_1)
self.model_horizontalLayout_1 = QtWidgets.QHBoxLayout()
self.model_horizontalLayout_1.setObjectName("model_horizontalLayout_1")
self.cnn_label = QtWidgets.QLabel(self.model_page)
self.cnn_label.setMinimumSize(QtCore.QSize(50, 22))
self.cnn_label.setMaximumSize(QtCore.QSize(100, 25))
self.cnn_label.setObjectName("cnn_label")
self.model_horizontalLayout_1.addWidget(self.cnn_label)
self.cnn_lineEdit = QtWidgets.QLineEdit(self.model_page)
self.cnn_lineEdit.setMinimumSize(QtCore.QSize(22, 22))
self.cnn_lineEdit.setMaximumSize(QtCore.QSize(30, 22))
self.cnn_lineEdit.setAlignment(QtCore.Qt.AlignCenter)
self.cnn_lineEdit.setObjectName("cnn_lineEdit")
self.model_horizontalLayout_1.addWidget(self.cnn_lineEdit)
self.model_verticalLayout_1.addLayout(self.model_horizontalLayout_1)
self.model_line_2 = QtWidgets.QFrame(self.model_page)
self.model_line_2.setFrameShape(QtWidgets.QFrame.HLine)
self.model_line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
self.model_line_2.setObjectName("model_line_2")
self.model_verticalLayout_1.addWidget(self.model_line_2)
self.model_verticalLayout_3 = QtWidgets.QVBoxLayout()
self.model_verticalLayout_3.setObjectName("model_verticalLayout_3")
self.inputSize_label = QtWidgets.QLabel(self.model_page)
self.inputSize_label.setObjectName("inputSize_label")
self.model_verticalLayout_3.addWidget(self.inputSize_label, 0, QtCore.Qt.AlignHCenter)
self.model_horizontalLayout_5 = QtWidgets.QHBoxLayout()
self.model_horizontalLayout_5.setSpacing(15)
self.model_horizontalLayout_5.setObjectName("model_horizontalLayout_5")
self.model_horizontalLayout_6 = QtWidgets.QHBoxLayout()
self.model_horizontalLayout_6.setSpacing(0)
self.model_horizontalLayout_6.setObjectName("model_horizontalLayout_6")
self.height_label = QtWidgets.QLabel(self.model_page)
self.height_label.setMinimumSize(QtCore.QSize(22, 22))
self.height_label.setMaximumSize(QtCore.QSize(25, 22))
self.height_label.setObjectName("height_label")
self.model_horizontalLayout_6.addWidget(self.height_label, 0, QtCore.Qt.AlignRight)
self.height_lineEdit = QtWidgets.QLineEdit(self.model_page)
self.height_lineEdit.setMinimumSize(QtCore.QSize(22, 22))
self.height_lineEdit.setMaximumSize(QtCore.QSize(35, 22))
self.height_lineEdit.setAlignment(QtCore.Qt.AlignCenter)
self.height_lineEdit.setObjectName("height_lineEdit")
self.model_horizontalLayout_6.addWidget(self.height_lineEdit)
self.model_horizontalLayout_5.addLayout(self.model_horizontalLayout_6)
self.model_horizontalLayout_7 = QtWidgets.QHBoxLayout()
self.model_horizontalLayout_7.setSpacing(0)
self.model_horizontalLayout_7.setObjectName("model_horizontalLayout_7")
self.width_label = QtWidgets.QLabel(self.model_page)
self.width_label.setMinimumSize(QtCore.QSize(22, 22))
self.width_label.setMaximumSize(QtCore.QSize(25, 22))
self.width_label.setObjectName("width_label")
self.model_horizontalLayout_7.addWidget(self.width_label, 0, QtCore.Qt.AlignRight)
self.width_lineEdit = QtWidgets.QLineEdit(self.model_page)
self.width_lineEdit.setMinimumSize(QtCore.QSize(22, 22))
self.width_lineEdit.setMaximumSize(QtCore.QSize(35, 22))
self.width_lineEdit.setAlignment(QtCore.Qt.AlignCenter)
self.width_lineEdit.setObjectName("width_lineEdit")
self.model_horizontalLayout_7.addWidget(self.width_lineEdit)
self.model_horizontalLayout_5.addLayout(self.model_horizontalLayout_7)
self.model_horizontalLayout_8 = QtWidgets.QHBoxLayout()
self.model_horizontalLayout_8.setSpacing(0)
self.model_horizontalLayout_8.setObjectName("model_horizontalLayout_8")
self.channels_label = QtWidgets.QLabel(self.model_page)
self.channels_label.setMinimumSize(QtCore.QSize(22, 22))
self.channels_label.setMaximumSize(QtCore.QSize(25, 22))
self.channels_label.setObjectName("channels_label")
self.model_horizontalLayout_8.addWidget(self.channels_label, 0, QtCore.Qt.AlignRight)
self.channels_lineEdit = QtWidgets.QLineEdit(self.model_page)
self.channels_lineEdit.setMinimumSize(QtCore.QSize(22, 22))
self.channels_lineEdit.setMaximumSize(QtCore.QSize(35, 22))
self.channels_lineEdit.setAlignment(QtCore.Qt.AlignCenter)
self.channels_lineEdit.setObjectName("channels_lineEdit")
self.model_horizontalLayout_8.addWidget(self.channels_lineEdit)
self.model_horizontalLayout_5.addLayout(self.model_horizontalLayout_8)
self.model_verticalLayout_3.addLayout(self.model_horizontalLayout_5)
self.model_verticalLayout_1.addLayout(self.model_verticalLayout_3)
self.model_line_3 = QtWidgets.QFrame(self.model_page)
self.model_line_3.setFrameShape(QtWidgets.QFrame.HLine)
self.model_line_3.setFrameShadow(QtWidgets.QFrame.Sunken)
self.model_line_3.setObjectName("model_line_3")
self.model_verticalLayout_1.addWidget(self.model_line_3)
self.model_horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.model_horizontalLayout_2.setObjectName("model_horizontalLayout_2")
self.model_verticalLayout_4 = QtWidgets.QVBoxLayout()
self.model_verticalLayout_4.setObjectName("model_verticalLayout_4")
self.dense_label = QtWidgets.QLabel(self.model_page)
self.dense_label.setMinimumSize(QtCore.QSize(50, 22))
self.dense_label.setMaximumSize(QtCore.QSize(100, 25))
self.dense_label.setObjectName("dense_label")
self.model_verticalLayout_4.addWidget(self.dense_label, 0, QtCore.Qt.AlignHCenter|QtCore.Qt.AlignVCenter)
self.dense_lineEdit = QtWidgets.QLineEdit(self.model_page)
self.dense_lineEdit.setMinimumSize(QtCore.QSize(22, 22))
self.dense_lineEdit.setMaximumSize(QtCore.QSize(30, 22))
self.dense_lineEdit.setAlignment(QtCore.Qt.AlignCenter)
self.dense_lineEdit.setObjectName("dense_lineEdit")
self.model_verticalLayout_4.addWidget(self.dense_lineEdit, 0, QtCore.Qt.AlignHCenter)
self.model_horizontalLayout_2.addLayout(self.model_verticalLayout_4)
self.model_line_5 = QtWidgets.QFrame(self.model_page)
self.model_line_5.setFrameShape(QtWidgets.QFrame.VLine)
self.model_line_5.setFrameShadow(QtWidgets.QFrame.Sunken)
self.model_line_5.setObjectName("model_line_5")
self.model_horizontalLayout_2.addWidget(self.model_line_5)
self.model_verticalLayout_5 = QtWidgets.QVBoxLayout()
self.model_verticalLayout_5.setObjectName("model_verticalLayout_5")
self.classes_label = QtWidgets.QLabel(self.model_page)
self.classes_label.setMinimumSize(QtCore.QSize(50, 22))
self.classes_label.setMaximumSize(QtCore.QSize(100, 25))
self.classes_label.setObjectName("classes_label")
self.model_verticalLayout_5.addWidget(self.classes_label, 0, QtCore.Qt.AlignHCenter|QtCore.Qt.AlignVCenter)
self.classes_lineEdit = QtWidgets.QLineEdit(self.model_page)
self.classes_lineEdit.setMinimumSize(QtCore.QSize(22, 22))
self.classes_lineEdit.setMaximumSize(QtCore.QSize(30, 22))
self.classes_lineEdit.setAlignment(QtCore.Qt.AlignCenter)
self.classes_lineEdit.setObjectName("classes_lineEdit")
self.model_verticalLayout_5.addWidget(self.classes_lineEdit, 0, QtCore.Qt.AlignHCenter)
self.model_horizontalLayout_2.addLayout(self.model_verticalLayout_5)
self.model_verticalLayout_1.addLayout(self.model_horizontalLayout_2)
self.model_line_4 = QtWidgets.QFrame(self.model_page)
self.model_line_4.setFrameShape(QtWidgets.QFrame.HLine)
self.model_line_4.setFrameShadow(QtWidgets.QFrame.Sunken)
self.model_line_4.setObjectName("model_line_4")
self.model_verticalLayout_1.addWidget(self.model_line_4)
self.model_horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.model_horizontalLayout_3.setObjectName("model_horizontalLayout_3")
self.lstm_label = QtWidgets.QLabel(self.model_page)
self.lstm_label.setMinimumSize(QtCore.QSize(50, 22))
self.lstm_label.setMaximumSize(QtCore.QSize(100, 25))
self.lstm_label.setObjectName("lstm_label")
self.model_horizontalLayout_3.addWidget(self.lstm_label)
self.lstm_lineEdit = QtWidgets.QLineEdit(self.model_page)
self.lstm_lineEdit.setMinimumSize(QtCore.QSize(22, 22))
self.lstm_lineEdit.setMaximumSize(QtCore.QSize(30, 22))
self.lstm_lineEdit.setAlignment(QtCore.Qt.AlignCenter)
self.lstm_lineEdit.setObjectName("lstm_lineEdit")
self.model_horizontalLayout_3.addWidget(self.lstm_lineEdit)
self.model_verticalLayout_1.addLayout(self.model_horizontalLayout_3)
self.model_horizontalLayout_4 = QtWidgets.QHBoxLayout()
self.model_horizontalLayout_4.setObjectName("model_horizontalLayout_4")
self.reset_pushButton = QtWidgets.QPushButton(self.model_page)
self.reset_pushButton.setStyleSheet("")
self.reset_pushButton.setObjectName("reset_pushButton")
self.model_horizontalLayout_4.addWidget(self.reset_pushButton)
self.initialize_pushButton = QtWidgets.QPushButton(self.model_page)
self.initialize_pushButton.setObjectName("initialize_pushButton")
self.model_horizontalLayout_4.addWidget(self.initialize_pushButton)
self.model_verticalLayout_1.addLayout(self.model_horizontalLayout_4)
self.model_gridLayout.addLayout(self.model_verticalLayout_1, 0, 0, 1, 1)
self.stackedWidget.addWidget(self.model_page)
self.gridLayout.addWidget(self.stackedWidget, 0, 0, 1, 1)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 219, 26))
self.menubar.setObjectName("menubar")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.reset_pushButton.clicked.connect(self.reset_pushButton_func)
self.initialize_pushButton.clicked.connect(self.initialize_func)
self.cnn_lineEdit.setValidator(self.intOnly)
self.height_lineEdit.setValidator(self.intOnly)
self.width_lineEdit.setValidator(self.intOnly)
self.channels_lineEdit.setValidator(self.intOnly)
self.dense_lineEdit.setValidator(self.intOnly)
self.classes_lineEdit.setValidator(self.intOnly)
self.lstm_lineEdit.setValidator(self.intOnly)
self.retranslateUi()
self.stackedWidget.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self):#, MainWindow):
#_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle("ModelCreator")
self.modelName_label.setText("Model\'s Name")
self.modelName_lineEdit.setText("Model")
self.cnn_label.setText("CNN layers")
self.cnn_lineEdit.setText("0")
self.cnn_lineEdit.setPlaceholderText("0")
self.inputSize_label.setText("Input Size")
self.height_label.setText("H:")
self.height_lineEdit.setText("0")
self.width_label.setText("W:")
self.width_lineEdit.setText("0")
self.channels_label.setText("C:")
self.channels_lineEdit.setText("0")
self.dense_label.setText("Dense layers")
self.dense_lineEdit.setText("0")
self.classes_label.setText("Classes")
self.classes_lineEdit.setText("0")
self.lstm_label.setText("LSTM layers")
self.lstm_lineEdit.setText("0")
self.reset_pushButton.setText("Reset")
self.initialize_pushButton.setText("Initialize")
def cnnpage_constuctor(self, index):
self.cnn_page = QtWidgets.QWidget()
self.cnn_page.setObjectName("cnn_page")
self.cnn_gridLayout = QtWidgets.QGridLayout(self.cnn_page)
self.cnn_gridLayout.setObjectName("cnn_gridLayout")
self.cnn_verticalLayout_1 = QtWidgets.QVBoxLayout()
self.cnn_verticalLayout_1.setSpacing(10)
self.cnn_verticalLayout_1.setObjectName("cnn_verticalLayout_1")
self.cnn_verticalLayout_2 = QtWidgets.QVBoxLayout()
self.cnn_verticalLayout_2.setObjectName("cnn_verticalLayout_2")
self.cnnName_label = QtWidgets.QLabel(self.cnn_page)
self.cnnName_label.setObjectName("cnnName_label")
self.cnn_verticalLayout_2.addWidget(self.cnnName_label, 0, QtCore.Qt.AlignHCenter)
self.cnnName_lineEdit = QtWidgets.QLineEdit(self.cnn_page)
self.cnnName_lineEdit.setMinimumSize(QtCore.QSize(22, 22))
self.cnnName_lineEdit.setMaximumSize(QtCore.QSize(125, 22))
self.cnnName_lineEdit.setText("")
self.cnnName_lineEdit.setAlignment(QtCore.Qt.AlignCenter)
self.cnnName_lineEdit.setObjectName("cnnName_lineEdit")
self.cnn_verticalLayout_2.addWidget(self.cnnName_lineEdit, 0, QtCore.Qt.AlignHCenter)
self.cnn_verticalLayout_1.addLayout(self.cnn_verticalLayout_2)
self.cnn_line_1 = QtWidgets.QFrame(self.cnn_page)
self.cnn_line_1.setFrameShape(QtWidgets.QFrame.HLine)
self.cnn_line_1.setFrameShadow(QtWidgets.QFrame.Sunken)
self.cnn_line_1.setObjectName("cnn_line_1")
self.cnn_verticalLayout_1.addWidget(self.cnn_line_1)
self.cnn_horizontalLayout_1 = QtWidgets.QHBoxLayout()
self.cnn_horizontalLayout_1.setObjectName("cnn_horizontalLayout_1")
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.cnn_horizontalLayout_1.addItem(spacerItem)
self.filters_label = QtWidgets.QLabel(self.cnn_page)
self.filters_label.setMinimumSize(QtCore.QSize(50, 22))
self.filters_label.setMaximumSize(QtCore.QSize(125, 25))
self.filters_label.setObjectName("filters_label")
self.cnn_horizontalLayout_1.addWidget(self.filters_label, 0, QtCore.Qt.AlignHCenter)
self.filters_lineEdit = QtWidgets.QLineEdit(self.cnn_page)
self.filters_lineEdit.setMinimumSize(QtCore.QSize(22, 22))
self.filters_lineEdit.setMaximumSize(QtCore.QSize(30, 22))
self.filters_lineEdit.setAlignment(QtCore.Qt.AlignCenter)
self.filters_lineEdit.setObjectName("filters_lineEdit")
self.cnn_horizontalLayout_1.addWidget(self.filters_lineEdit, 0, QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.cnn_horizontalLayout_1.addItem(spacerItem1)
self.cnn_verticalLayout_1.addLayout(self.cnn_horizontalLayout_1)
self.cnn_line_2 = QtWidgets.QFrame(self.cnn_page)
self.cnn_line_2.setFrameShape(QtWidgets.QFrame.HLine)
self.cnn_line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
self.cnn_line_2.setObjectName("cnn_line_2")
self.cnn_verticalLayout_1.addWidget(self.cnn_line_2)
self.cnn_horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.cnn_horizontalLayout_2.setSpacing(10)
self.cnn_horizontalLayout_2.setObjectName("cnn_horizontalLayout_2")
self.cnn_verticalLayout_3 = QtWidgets.QVBoxLayout()
self.cnn_verticalLayout_3.setObjectName("cnn_verticalLayout_3")
self.cnnKernel_label = QtWidgets.QLabel(self.cnn_page)
self.cnnKernel_label.setMinimumSize(QtCore.QSize(70, 22))
self.cnnKernel_label.setMaximumSize(QtCore.QSize(70, 22))
self.cnnKernel_label.setObjectName("cnnKernel_label")
self.cnn_verticalLayout_3.addWidget(self.cnnKernel_label, 0, QtCore.Qt.AlignHCenter)
self.cnn_horizontalLayout_7 = QtWidgets.QHBoxLayout()
self.cnn_horizontalLayout_7.setSpacing(0)
self.cnn_horizontalLayout_7.setObjectName("cnn_horizontalLayout_7")
self.cnnKernel_lineEdit_1 = QtWidgets.QLineEdit(self.cnn_page)
self.cnnKernel_lineEdit_1.setMinimumSize(QtCore.QSize(22, 22))
self.cnnKernel_lineEdit_1.setMaximumSize(QtCore.QSize(30, 22))
self.cnnKernel_lineEdit_1.setAlignment(QtCore.Qt.AlignCenter)
self.cnnKernel_lineEdit_1.setObjectName("cnnKernel_lineEdit_1")
self.cnn_horizontalLayout_7.addWidget(self.cnnKernel_lineEdit_1, 0, QtCore.Qt.AlignHCenter)
self.cnnKernelx_label = QtWidgets.QLabel(self.cnn_page)
self.cnnKernelx_label.setMinimumSize(QtCore.QSize(22, 22))
self.cnnKernelx_label.setMaximumSize(QtCore.QSize(25, 22))
self.cnnKernelx_label.setAlignment(QtCore.Qt.AlignCenter)
self.cnnKernelx_label.setObjectName("cnnKernelx_label")
self.cnn_horizontalLayout_7.addWidget(self.cnnKernelx_label, 0, QtCore.Qt.AlignHCenter|QtCore.Qt.AlignVCenter)
self.cnnKernel_lineEdit_2 = QtWidgets.QLineEdit(self.cnn_page)
self.cnnKernel_lineEdit_2.setMinimumSize(QtCore.QSize(22, 22))
self.cnnKernel_lineEdit_2.setMaximumSize(QtCore.QSize(30, 22))
self.cnnKernel_lineEdit_2.setAlignment(QtCore.Qt.AlignCenter)
self.cnnKernel_lineEdit_2.setObjectName("cnnKernel_lineEdit_2")
self.cnn_horizontalLayout_7.addWidget(self.cnnKernel_lineEdit_2, 0, QtCore.Qt.AlignHCenter)
self.cnn_verticalLayout_3.addLayout(self.cnn_horizontalLayout_7)
self.cnn_horizontalLayout_2.addLayout(self.cnn_verticalLayout_3)
self.cnn_line_6 = QtWidgets.QFrame(self.cnn_page)
self.cnn_line_6.setFrameShape(QtWidgets.QFrame.VLine)
self.cnn_line_6.setFrameShadow(QtWidgets.QFrame.Sunken)
self.cnn_line_6.setObjectName("cnn_line_6")
self.cnn_horizontalLayout_2.addWidget(self.cnn_line_6)
self.cnn_verticalLayout_4 = QtWidgets.QVBoxLayout()
self.cnn_verticalLayout_4.setObjectName("cnn_verticalLayout_4")
self.cnnStride_label = QtWidgets.QLabel(self.cnn_page)
self.cnnStride_label.setMinimumSize(QtCore.QSize(70, 22))
self.cnnStride_label.setMaximumSize(QtCore.QSize(70, 22))
self.cnnStride_label.setObjectName("cnnStride_label")
self.cnn_verticalLayout_4.addWidget(self.cnnStride_label, 0, QtCore.Qt.AlignHCenter)
self.cnn_horizontalLayout_8 = QtWidgets.QHBoxLayout()
self.cnn_horizontalLayout_8.setSpacing(0)
self.cnn_horizontalLayout_8.setObjectName("cnn_horizontalLayout_8")
self.cnnStride_lineEdit_1 = QtWidgets.QLineEdit(self.cnn_page)
self.cnnStride_lineEdit_1.setMinimumSize(QtCore.QSize(22, 22))
self.cnnStride_lineEdit_1.setMaximumSize(QtCore.QSize(30, 22))
self.cnnStride_lineEdit_1.setAlignment(QtCore.Qt.AlignCenter)
self.cnnStride_lineEdit_1.setObjectName("cnnStride_lineEdit_1")
self.cnn_horizontalLayout_8.addWidget(self.cnnStride_lineEdit_1, 0, QtCore.Qt.AlignHCenter)
self.cnnStridex_label = QtWidgets.QLabel(self.cnn_page)
self.cnnStridex_label.setMinimumSize(QtCore.QSize(22, 22))
self.cnnStridex_label.setMaximumSize(QtCore.QSize(25, 22))
self.cnnStridex_label.setAlignment(QtCore.Qt.AlignCenter)
self.cnnStridex_label.setObjectName("cnnStridex_label")
self.cnn_horizontalLayout_8.addWidget(self.cnnStridex_label, 0, QtCore.Qt.AlignHCenter|QtCore.Qt.AlignVCenter)
self.cnnStride_lineEdit_2 = QtWidgets.QLineEdit(self.cnn_page)
self.cnnStride_lineEdit_2.setMinimumSize(QtCore.QSize(22, 22))
self.cnnStride_lineEdit_2.setMaximumSize(QtCore.QSize(30, 22))
self.cnnStride_lineEdit_2.setAlignment(QtCore.Qt.AlignCenter)
self.cnnStride_lineEdit_2.setObjectName("cnnStride_lineEdit_2")
self.cnn_horizontalLayout_8.addWidget(self.cnnStride_lineEdit_2, 0, QtCore.Qt.AlignHCenter)
self.cnn_verticalLayout_4.addLayout(self.cnn_horizontalLayout_8)
self.cnn_horizontalLayout_2.addLayout(self.cnn_verticalLayout_4)
self.cnn_verticalLayout_1.addLayout(self.cnn_horizontalLayout_2)
self.cnn_line_3 = QtWidgets.QFrame(self.cnn_page)
self.cnn_line_3.setFrameShape(QtWidgets.QFrame.HLine)
self.cnn_line_3.setFrameShadow(QtWidgets.QFrame.Sunken)
self.cnn_line_3.setObjectName("cnn_line_3")
self.cnn_verticalLayout_1.addWidget(self.cnn_line_3)
self.cnn_horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.cnn_horizontalLayout_3.setSpacing(10)
self.cnn_horizontalLayout_3.setObjectName("cnn_horizontalLayout_3")
self.cnn_verticalLayout_5 = QtWidgets.QVBoxLayout()
self.cnn_verticalLayout_5.setObjectName("cnn_verticalLayout_5")
self.maxpKernel_label = QtWidgets.QLabel(self.cnn_page)
self.maxpKernel_label.setMinimumSize(QtCore.QSize(70, 22))
self.maxpKernel_label.setMaximumSize(QtCore.QSize(70, 22))
self.maxpKernel_label.setObjectName("maxpKernel_label")
self.cnn_verticalLayout_5.addWidget(self.maxpKernel_label, 0, QtCore.Qt.AlignHCenter)
self.cnn_horizontalLayout_9 = QtWidgets.QHBoxLayout()
self.cnn_horizontalLayout_9.setSpacing(0)
self.cnn_horizontalLayout_9.setObjectName("cnn_horizontalLayout_9")
self.maxpKernel_lineEdit_1 = QtWidgets.QLineEdit(self.cnn_page)
self.maxpKernel_lineEdit_1.setMinimumSize(QtCore.QSize(22, 22))
self.maxpKernel_lineEdit_1.setMaximumSize(QtCore.QSize(30, 22))
self.maxpKernel_lineEdit_1.setAlignment(QtCore.Qt.AlignCenter)
self.maxpKernel_lineEdit_1.setObjectName("maxpKernel_lineEdit_1")
self.cnn_horizontalLayout_9.addWidget(self.maxpKernel_lineEdit_1, 0, QtCore.Qt.AlignHCenter)
self.maxpKernelx_label = QtWidgets.QLabel(self.cnn_page)
self.maxpKernelx_label.setMinimumSize(QtCore.QSize(22, 22))
self.maxpKernelx_label.setMaximumSize(QtCore.QSize(25, 22))
self.maxpKernelx_label.setAlignment(QtCore.Qt.AlignCenter)
self.maxpKernelx_label.setObjectName("maxpKernelx_label")
self.cnn_horizontalLayout_9.addWidget(self.maxpKernelx_label, 0, QtCore.Qt.AlignHCenter|QtCore.Qt.AlignVCenter)
self.maxpKernel_lineEdit_2 = QtWidgets.QLineEdit(self.cnn_page)
self.maxpKernel_lineEdit_2.setMinimumSize(QtCore.QSize(22, 22))
self.maxpKernel_lineEdit_2.setMaximumSize(QtCore.QSize(30, 22))
self.maxpKernel_lineEdit_2.setAlignment(QtCore.Qt.AlignCenter)
self.maxpKernel_lineEdit_2.setObjectName("maxpKernel_lineEdit_2")
self.cnn_horizontalLayout_9.addWidget(self.maxpKernel_lineEdit_2, 0, QtCore.Qt.AlignHCenter)
self.cnn_verticalLayout_5.addLayout(self.cnn_horizontalLayout_9)
self.cnn_horizontalLayout_3.addLayout(self.cnn_verticalLayout_5)
self.cnn_line_7 = QtWidgets.QFrame(self.cnn_page)
self.cnn_line_7.setFrameShape(QtWidgets.QFrame.VLine)
self.cnn_line_7.setFrameShadow(QtWidgets.QFrame.Sunken)
self.cnn_line_7.setObjectName("cnn_line_7")
self.cnn_horizontalLayout_3.addWidget(self.cnn_line_7)
self.cnn_verticalLayout_6 = QtWidgets.QVBoxLayout()
self.cnn_verticalLayout_6.setObjectName("cnn_verticalLayout_6")
self.maxpStride_label = QtWidgets.QLabel(self.cnn_page)
self.maxpStride_label.setMinimumSize(QtCore.QSize(70, 22))
self.maxpStride_label.setMaximumSize(QtCore.QSize(70, 22))
self.maxpStride_label.setObjectName("maxpStride_label")
self.cnn_verticalLayout_6.addWidget(self.maxpStride_label, 0, QtCore.Qt.AlignHCenter)
self.cnn_horizontalLayout_10 = QtWidgets.QHBoxLayout()
self.cnn_horizontalLayout_10.setSpacing(0)
self.cnn_horizontalLayout_10.setObjectName("cnn_horizontalLayout_10")
self.maxpStride_lineEdit_1 = QtWidgets.QLineEdit(self.cnn_page)
self.maxpStride_lineEdit_1.setMinimumSize(QtCore.QSize(22, 22))
self.maxpStride_lineEdit_1.setMaximumSize(QtCore.QSize(30, 22))
self.maxpStride_lineEdit_1.setAlignment(QtCore.Qt.AlignCenter)
self.maxpStride_lineEdit_1.setObjectName("maxpStride_lineEdit_1")
self.cnn_horizontalLayout_10.addWidget(self.maxpStride_lineEdit_1, 0, QtCore.Qt.AlignHCenter)
self.maxpStridex_label = QtWidgets.QLabel(self.cnn_page)
self.maxpStridex_label.setMinimumSize(QtCore.QSize(22, 22))
self.maxpStridex_label.setMaximumSize(QtCore.QSize(25, 22))
self.maxpStridex_label.setAlignment(QtCore.Qt.AlignCenter)
self.maxpStridex_label.setObjectName("maxpStridex_label")
self.cnn_horizontalLayout_10.addWidget(self.maxpStridex_label, 0, QtCore.Qt.AlignHCenter|QtCore.Qt.AlignVCenter)
self.maxpStride_lineEdit_2 = QtWidgets.QLineEdit(self.cnn_page)
self.maxpStride_lineEdit_2.setMinimumSize(QtCore.QSize(22, 22))
self.maxpStride_lineEdit_2.setMaximumSize(QtCore.QSize(30, 22))
self.maxpStride_lineEdit_2.setAlignment(QtCore.Qt.AlignCenter)
self.maxpStride_lineEdit_2.setObjectName("maxpStride_lineEdit_2")
self.cnn_horizontalLayout_10.addWidget(self.maxpStride_lineEdit_2, 0, QtCore.Qt.AlignHCenter)
self.cnn_verticalLayout_6.addLayout(self.cnn_horizontalLayout_10)
self.cnn_horizontalLayout_3.addLayout(self.cnn_verticalLayout_6)
self.cnn_verticalLayout_1.addLayout(self.cnn_horizontalLayout_3)
self.cnn_line_8 = QtWidgets.QFrame(self.cnn_page)
self.cnn_line_8.setFrameShape(QtWidgets.QFrame.HLine)
self.cnn_line_8.setFrameShadow(QtWidgets.QFrame.Sunken)
self.cnn_line_8.setObjectName("cnn_line_8")
self.cnn_verticalLayout_1.addWidget(self.cnn_line_8)
self.cnn_horizontalLayout_11 = QtWidgets.QHBoxLayout()
self.cnn_horizontalLayout_11.setObjectName("cnn_horizontalLayout_11")
spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.cnn_horizontalLayout_11.addItem(spacerItem2)
self.cnnPadding_label = QtWidgets.QLabel(self.cnn_page)
self.cnnPadding_label.setMinimumSize(QtCore.QSize(55, 22))
self.cnnPadding_label.setMaximumSize(QtCore.QSize(70, 25))
self.cnnPadding_label.setObjectName("cnnPadding_label")
self.cnn_horizontalLayout_11.addWidget(self.cnnPadding_label)
self.cnnPadding_comboBox = QtWidgets.QComboBox(self.cnn_page)
self.cnnPadding_comboBox.setMinimumSize(QtCore.QSize(110, 22))
self.cnnPadding_comboBox.setMaximumSize(QtCore.QSize(150, 25))
self.cnnPadding_comboBox.setObjectName("cnnPadding_comboBox")
self.cnnPadding_comboBox.addItem("")
self.cnnPadding_comboBox.addItem("")
self.cnnPadding_comboBox.addItem("")
self.cnn_horizontalLayout_11.addWidget(self.cnnPadding_comboBox)
spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.cnn_horizontalLayout_11.addItem(spacerItem3)
self.cnn_verticalLayout_1.addLayout(self.cnn_horizontalLayout_11)
self.cnn_line_4 = QtWidgets.QFrame(self.cnn_page)
self.cnn_line_4.setFrameShape(QtWidgets.QFrame.HLine)
self.cnn_line_4.setFrameShadow(QtWidgets.QFrame.Sunken)
self.cnn_line_4.setObjectName("cnn_line_4")
self.cnn_verticalLayout_1.addWidget(self.cnn_line_4)
self.cnn_horizontalLayout_4 = QtWidgets.QHBoxLayout()
self.cnn_horizontalLayout_4.setObjectName("cnn_horizontalLayout_4")
spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.cnn_horizontalLayout_4.addItem(spacerItem4)
self.cnnInitializer_label = QtWidgets.QLabel(self.cnn_page)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.cnnInitializer_label.sizePolicy().hasHeightForWidth())
self.cnnInitializer_label.setSizePolicy(sizePolicy)
self.cnnInitializer_label.setMinimumSize(QtCore.QSize(55, 22))
self.cnnInitializer_label.setMaximumSize(QtCore.QSize(70, 25))
self.cnnInitializer_label.setObjectName("cnnInitializer_label")
self.cnn_horizontalLayout_4.addWidget(self.cnnInitializer_label)
self.cnnInitializer_comboBox = QtWidgets.QComboBox(self.cnn_page)
self.cnnInitializer_comboBox.setMinimumSize(QtCore.QSize(110, 22))
self.cnnInitializer_comboBox.setMaximumSize(QtCore.QSize(150, 25))
self.cnnInitializer_comboBox.setMaxVisibleItems(15)
self.cnnInitializer_comboBox.setObjectName("cnnInitializer_comboBox")
for _ in range(15):
self.cnnInitializer_comboBox.addItem("")
self.cnn_horizontalLayout_4.addWidget(self.cnnInitializer_comboBox)
spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.cnn_horizontalLayout_4.addItem(spacerItem5)
self.cnn_verticalLayout_1.addLayout(self.cnn_horizontalLayout_4)
self.cnn_line_5_ = QtWidgets.QFrame(self.cnn_page)
self.cnn_line_5_.setFrameShape(QtWidgets.QFrame.HLine)
self.cnn_line_5_.setFrameShadow(QtWidgets.QFrame.Sunken)
self.cnn_line_5_.setObjectName("cnn_line_5_")
self.cnn_verticalLayout_1.addWidget(self.cnn_line_5_)
self.cnn_horizontalLayout_5 = QtWidgets.QHBoxLayout()
self.cnn_horizontalLayout_5.setObjectName("cnn_horizontalLayout_5")
spacerItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.cnn_horizontalLayout_5.addItem(spacerItem6)
self.cnnActivation_label = QtWidgets.QLabel(self.cnn_page)
self.cnnActivation_label.setMinimumSize(QtCore.QSize(55, 22))
self.cnnActivation_label.setMaximumSize(QtCore.QSize(70, 25))
self.cnnActivation_label.setObjectName("cnnActivation_label")
self.cnn_horizontalLayout_5.addWidget(self.cnnActivation_label)
self.cnnActivation_comboBox = QtWidgets.QComboBox(self.cnn_page)
self.cnnActivation_comboBox.setMinimumSize(QtCore.QSize(110, 22))
self.cnnActivation_comboBox.setMaximumSize(QtCore.QSize(150, 25))
self.cnnActivation_comboBox.setObjectName("cnnActivation_comboBox")
for _ in range(10):
self.cnnActivation_comboBox.addItem("")
self.cnn_horizontalLayout_5.addWidget(self.cnnActivation_comboBox)
spacerItem7 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.cnn_horizontalLayout_5.addItem(spacerItem7)
self.cnn_verticalLayout_1.addLayout(self.cnn_horizontalLayout_5)
self.cnn_horizontalLayout_6 = QtWidgets.QHBoxLayout()
self.cnn_horizontalLayout_6.setObjectName("cnn_horizontalLayout_6")
self.back_pushButton = QtWidgets.QPushButton(self.cnn_page)
self.back_pushButton.setObjectName("back_pushButton")
self.cnn_horizontalLayout_6.addWidget(self.back_pushButton)
self.next_pushButton = QtWidgets.QPushButton(self.cnn_page)
self.next_pushButton.setObjectName("next_pushButton")
self.cnn_horizontalLayout_6.addWidget(self.next_pushButton)
self.cnn_verticalLayout_1.addLayout(self.cnn_horizontalLayout_6)
self.cnn_gridLayout.addLayout(self.cnn_verticalLayout_1, 0, 0, 1, 1)
self.back_pushButton.clicked.connect(self.previouspage)
self.next_pushButton.clicked.connect(self.nextpage)
self.filters_lineEdit.setValidator(self.intOnly)
self.cnnKernel_lineEdit_1.setValidator(self.intOnly)
self.cnnKernel_lineEdit_2.setValidator(self.intOnly)
self.cnnStride_lineEdit_1.setValidator(self.intOnly)
self.cnnStride_lineEdit_2.setValidator(self.intOnly)
self.maxpKernel_lineEdit_1.setValidator(self.intOnly)
self.maxpKernel_lineEdit_2.setValidator(self.intOnly)
self.maxpStride_lineEdit_1.setValidator(self.intOnly)
self.maxpStride_lineEdit_2.setValidator(self.intOnly)
self.cnnName_label.setText("CNN_layer_"+index+" Name")
self.cnnName_lineEdit.setText("Conv_"+index)
self.filters_label.setText("Filters")
self.filters_lineEdit.setText('0')
self.cnnKernel_label.setText("CNN Kernel")
self.cnnKernel_lineEdit_1.setText('0')
self.cnnKernelx_label.setText("x")
self.cnnKernel_lineEdit_2.setText('0')
self.cnnStride_label.setText("CNN Stride")
self.cnnStride_lineEdit_1.setText('0')
self.cnnStridex_label.setText("x")
self.cnnStride_lineEdit_2.setText('0')
self.maxpKernel_label.setText("MaxP Kernel")
self.maxpKernel_lineEdit_1.setText('0')
self.maxpKernelx_label.setText("x")
self.maxpKernel_lineEdit_2.setText('0')
self.maxpStride_label.setText("MaxP Stride")
self.maxpStride_lineEdit_1.setText('0')
self.maxpStridex_label.setText("x")
self.maxpStride_lineEdit_2.setText('0')
self.cnnPadding_label.setText("Padding")
self.cnnPadding_comboBox.setItemText(0, "Valid")
self.cnnPadding_comboBox.setItemText(1, "Casual")
self.cnnPadding_comboBox.setItemText(2, "Same")
self.cnnInitializer_label.setText("Initializer")
self.cnnInitializer_comboBox.setItemText(0, "Zeros")
self.cnnInitializer_comboBox.setItemText(1, "Ones")
self.cnnInitializer_comboBox.setItemText(2, "Constant")
self.cnnInitializer_comboBox.setItemText(3, "RandomNormal")
self.cnnInitializer_comboBox.setItemText(4, "RandomUniform")
self.cnnInitializer_comboBox.setItemText(5, "TruncatedNormal")
self.cnnInitializer_comboBox.setItemText(6, "VarianceScaling")
self.cnnInitializer_comboBox.setItemText(7, "Orthogonal")
self.cnnInitializer_comboBox.setItemText(8, "Identity")
self.cnnInitializer_comboBox.setItemText(9, "Glorot Normal")
self.cnnInitializer_comboBox.setItemText(10, "Glorot Uniform")
self.cnnInitializer_comboBox.setItemText(11, "He Normal")
self.cnnInitializer_comboBox.setItemText(12, "He Uniform")
self.cnnInitializer_comboBox.setItemText(13, "Lecun Normal")
self.cnnInitializer_comboBox.setItemText(14, "Lecun Uniform")
self.cnnActivation_label.setText("Activation")
self.cnnActivation_comboBox.setItemText(0, "SoftMax")
self.cnnActivation_comboBox.setItemText(1, "ReLU")
self.cnnActivation_comboBox.setItemText(2, "ELU")
self.cnnActivation_comboBox.setItemText(3, "SELU")
self.cnnActivation_comboBox.setItemText(4, "SoftPlus")
self.cnnActivation_comboBox.setItemText(5, "SoftSign")
self.cnnActivation_comboBox.setItemText(6, "tanh")
self.cnnActivation_comboBox.setItemText(7, "Sigmoid")
self.cnnActivation_comboBox.setItemText(8, "Hard Sigmoid")
self.cnnActivation_comboBox.setItemText(9, "Linear")
self.back_pushButton.setText("Back")
self.next_pushButton.setText("Next")
self.stackedWidget.addWidget(self.cnn_page)
def densepage_constuctor(self,index):
self.dense_page = QtWidgets.QWidget()
self.dense_page.setObjectName("dense_page")
self.dense_gridLayout = QtWidgets.QGridLayout(self.dense_page)
self.dense_gridLayout.setObjectName("dense_gridLayout")
self.dense_verticalLayout_1 = QtWidgets.QVBoxLayout()
self.dense_verticalLayout_1.setSpacing(10)
self.dense_verticalLayout_1.setObjectName("dense_verticalLayout_1")
self.dense_verticalLayout_2 = QtWidgets.QVBoxLayout()
self.dense_verticalLayout_2.setObjectName("dense_verticalLayout_2")
self.denseName_label = QtWidgets.QLabel(self.dense_page)
self.denseName_label.setObjectName("denseName_label")
self.dense_verticalLayout_2.addWidget(self.denseName_label, 0, QtCore.Qt.AlignHCenter)
self.denseName_lineEdit = QtWidgets.QLineEdit(self.dense_page)
self.denseName_lineEdit.setMinimumSize(QtCore.QSize(22, 22))
self.denseName_lineEdit.setMaximumSize(QtCore.QSize(125, 22))
self.denseName_lineEdit.setText("")
self.denseName_lineEdit.setAlignment(QtCore.Qt.AlignCenter)
self.denseName_lineEdit.setObjectName("denseName_lineEdit")
self.dense_verticalLayout_2.addWidget(self.denseName_lineEdit, 0, QtCore.Qt.AlignHCenter)
self.dense_verticalLayout_1.addLayout(self.dense_verticalLayout_2)
self.dense_line_1 = QtWidgets.QFrame(self.dense_page)
self.dense_line_1.setFrameShape(QtWidgets.QFrame.HLine)
self.dense_line_1.setFrameShadow(QtWidgets.QFrame.Sunken)
self.dense_line_1.setObjectName("dense_line_1")
self.dense_verticalLayout_1.addWidget(self.dense_line_1)
self.dense_horizontalLayout_1 = QtWidgets.QHBoxLayout()
self.dense_horizontalLayout_1.setObjectName("dense_horizontalLayout_1")
spacerItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.dense_horizontalLayout_1.addItem(spacerItem6)
self.denseUnits_label = QtWidgets.QLabel(self.dense_page)
self.denseUnits_label.setMinimumSize(QtCore.QSize(50, 22))
self.denseUnits_label.setMaximumSize(QtCore.QSize(70, 25))
self.denseUnits_label.setObjectName("denseUnits_label")
self.dense_horizontalLayout_1.addWidget(self.denseUnits_label)
self.denseUnits_lineEdit = QtWidgets.QLineEdit(self.dense_page)
self.denseUnits_lineEdit.setMinimumSize(QtCore.QSize(22, 22))
self.denseUnits_lineEdit.setMaximumSize(QtCore.QSize(30, 22))
self.denseUnits_lineEdit.setAlignment(QtCore.Qt.AlignCenter)
self.denseUnits_lineEdit.setObjectName("denseUnits_lineEdit")
self.dense_horizontalLayout_1.addWidget(self.denseUnits_lineEdit)
spacerItem7 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.dense_horizontalLayout_1.addItem(spacerItem7)
self.dense_verticalLayout_1.addLayout(self.dense_horizontalLayout_1)
self.dense_line_2 = QtWidgets.QFrame(self.dense_page)
self.dense_line_2.setFrameShape(QtWidgets.QFrame.HLine)
self.dense_line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
self.dense_line_2.setObjectName("dense_line_2")
self.dense_verticalLayout_1.addWidget(self.dense_line_2)
self.dense_horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.dense_horizontalLayout_2.setObjectName("dense_horizontalLayout_2")
spacerItem8 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.dense_horizontalLayout_2.addItem(spacerItem8)
self.denseDropout_label = QtWidgets.QLabel(self.dense_page)
self.denseDropout_label.setMinimumSize(QtCore.QSize(50, 22))
self.denseDropout_label.setMaximumSize(QtCore.QSize(70, 25))
self.denseDropout_label.setObjectName("denseDropout_label")
self.dense_horizontalLayout_2.addWidget(self.denseDropout_label)
self.denseDropout_lineEdit = QtWidgets.QLineEdit(self.dense_page)
self.denseDropout_lineEdit.setMinimumSize(QtCore.QSize(22, 22))
self.denseDropout_lineEdit.setMaximumSize(QtCore.QSize(30, 22))
self.denseDropout_lineEdit.setAlignment(QtCore.Qt.AlignCenter)
self.denseDropout_lineEdit.setObjectName("denseDropout_lineEdit")
self.dense_horizontalLayout_2.addWidget(self.denseDropout_lineEdit)
spacerItem9 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.dense_horizontalLayout_2.addItem(spacerItem9)
self.dense_verticalLayout_1.addLayout(self.dense_horizontalLayout_2)
self.dense_line_3 = QtWidgets.QFrame(self.dense_page)
self.dense_line_3.setFrameShape(QtWidgets.QFrame.HLine)
self.dense_line_3.setFrameShadow(QtWidgets.QFrame.Sunken)
self.dense_line_3.setObjectName("dense_line_3")
self.dense_verticalLayout_1.addWidget(self.dense_line_3)
self.dense_horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.dense_horizontalLayout_3.setObjectName("dense_horizontalLayout_3")
spacerItem10 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.dense_horizontalLayout_3.addItem(spacerItem10)
self.denseInitializer_label = QtWidgets.QLabel(self.dense_page)
self.denseInitializer_label.setMinimumSize(QtCore.QSize(55, 22))
self.denseInitializer_label.setMaximumSize(QtCore.QSize(70, 25))
self.denseInitializer_label.setObjectName("denseInitializer_label")
self.dense_horizontalLayout_3.addWidget(self.denseInitializer_label)
self.denseInitializer_comboBox = QtWidgets.QComboBox(self.dense_page)
self.denseInitializer_comboBox.setMinimumSize(QtCore.QSize(110, 22))
self.denseInitializer_comboBox.setObjectName("denseInitializer_comboBox")
self.denseInitializer_comboBox.setMaxVisibleItems(15)
for _ in range(15):
self.denseInitializer_comboBox.addItem("")
self.dense_horizontalLayout_3.addWidget(self.denseInitializer_comboBox)
spacerItem11 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.dense_horizontalLayout_3.addItem(spacerItem11)
self.dense_verticalLayout_1.addLayout(self.dense_horizontalLayout_3)
self.dense_line_4 = QtWidgets.QFrame(self.dense_page)
self.dense_line_4.setFrameShape(QtWidgets.QFrame.HLine)
self.dense_line_4.setFrameShadow(QtWidgets.QFrame.Sunken)
self.dense_line_4.setObjectName("dense_line_4")
self.dense_verticalLayout_1.addWidget(self.dense_line_4)
self.dense_horizontalLayout_4 = QtWidgets.QHBoxLayout()
self.dense_horizontalLayout_4.setObjectName("dense_horizontalLayout_4")
spacerItem12 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.dense_horizontalLayout_4.addItem(spacerItem12)
self.denseActivation_label = QtWidgets.QLabel(self.dense_page)
self.denseActivation_label.setMinimumSize(QtCore.QSize(55, 22))
self.denseActivation_label.setMaximumSize(QtCore.QSize(70, 25))
self.denseActivation_label.setObjectName("denseActivation_label")
self.dense_horizontalLayout_4.addWidget(self.denseActivation_label)
self.denseActivation_comboBox = QtWidgets.QComboBox(self.dense_page)
self.denseActivation_comboBox.setMinimumSize(QtCore.QSize(110, 22))
self.denseActivation_comboBox.setObjectName("denseActivation_comboBox")
for _ in range(10):
self.denseActivation_comboBox.addItem("")
self.dense_horizontalLayout_4.addWidget(self.denseActivation_comboBox)
spacerItem13 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.dense_horizontalLayout_4.addItem(spacerItem13)
self.dense_verticalLayout_1.addLayout(self.dense_horizontalLayout_4)
spacerItem14 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.dense_verticalLayout_1.addItem(spacerItem14)
self.dense_horizontalLayout_5 = QtWidgets.QHBoxLayout()
self.dense_horizontalLayout_5.setObjectName("dense_horizontalLayout_5")
self.back_pushButton = QtWidgets.QPushButton(self.dense_page)
self.back_pushButton.setObjectName("back_pushButton")
self.dense_horizontalLayout_5.addWidget(self.back_pushButton)
self.next_pushButton = QtWidgets.QPushButton(self.dense_page)
self.next_pushButton.setObjectName("next_pushButton")
self.dense_horizontalLayout_5.addWidget(self.next_pushButton)
self.dense_verticalLayout_1.addLayout(self.dense_horizontalLayout_5)
self.dense_gridLayout.addLayout(self.dense_verticalLayout_1, 0, 0, 1, 1)
self.back_pushButton.clicked.connect(self.previouspage)
self.next_pushButton.clicked.connect(self.nextpage)
self.denseUnits_lineEdit.setValidator(self.intOnly)
self.denseUnits_lineEdit.setValidator(self.intOnly)
self.denseName_label.setText("Dense_layer_" +index+ " Name")
self.denseName_lineEdit.setText("Dense_layer_"+index)
self.denseUnits_label.setText("Units")
self.denseUnits_lineEdit.setText("0")
self.denseDropout_label.setText("DropOut")
self.denseDropout_lineEdit.setText("0")
self.denseInitializer_label.setText("Initializer")
self.denseInitializer_comboBox.setItemText(0, "Zeros")
self.denseInitializer_comboBox.setItemText(1, "Ones")
self.denseInitializer_comboBox.setItemText(2, "Constant")
self.denseInitializer_comboBox.setItemText(3, "RandomNormal")
self.denseInitializer_comboBox.setItemText(4, "RandomUniform")
self.denseInitializer_comboBox.setItemText(5, "TruncatedNormal")
self.denseInitializer_comboBox.setItemText(6, "VarianceScaling")
self.denseInitializer_comboBox.setItemText(7, "Orthogonal")
self.denseInitializer_comboBox.setItemText(8, "Identity")
self.denseInitializer_comboBox.setItemText(9, "Glorot Normal")
self.denseInitializer_comboBox.setItemText(10, "Glorot Uniform")
self.denseInitializer_comboBox.setItemText(11, "He Normal")
self.denseInitializer_comboBox.setItemText(12, "He Uniform")
self.denseInitializer_comboBox.setItemText(13, "Lecun Normal")
self.denseInitializer_comboBox.setItemText(14, "Lecun Uniform")
self.denseActivation_label.setText("Activation")
self.denseActivation_comboBox.setItemText(0, "SoftMax")
self.denseActivation_comboBox.setItemText(1, "ReLU")
self.denseActivation_comboBox.setItemText(2, "ELU")
self.denseActivation_comboBox.setItemText(3, "SELU")
self.denseActivation_comboBox.setItemText(4, "SoftPlus")
self.denseActivation_comboBox.setItemText(5, "SoftSign")
self.denseActivation_comboBox.setItemText(6, "tanh")
self.denseActivation_comboBox.setItemText(7, "Sigmoid")
self.denseActivation_comboBox.setItemText(8, "Hard Sigmoid")
self.denseActivation_comboBox.setItemText(9, "Linear")
self.back_pushButton.setText("Back")
self.next_pushButton.setText("Next")
if index == 'output':
self.denseName_label.setText("Output_layer Name")
self.denseName_lineEdit.setText('Output_layer')
self.denseUnits_label.setText("Classes")
self.denseUnits_lineEdit.setText(str(self.nof_Classes))
self.denseUnits_lineEdit.setDisabled(True)
self.denseDropout_lineEdit.setDisabled(True)
self.next_pushButton.setText("Create")
self.next_pushButton.clicked.connect(self.create_model_func)
self.stackedWidget.addWidget(self.dense_page)
def lstmpage_constuctor(self):
pass
def compilepage_constructor(self):
self.compile_page = QtWidgets.QWidget()
self.compile_page.setObjectName("compile_page")
self.compile_gridLayout = QtWidgets.QGridLayout(self.compile_page)
self.compile_gridLayout.setObjectName("compile_gridLayout")
self.compile_verticalLayout_1 = QtWidgets.QVBoxLayout()
self.compile_verticalLayout_1.setSpacing(10)
self.compile_verticalLayout_1.setObjectName("compile_verticalLayout_1")
self.compile_label = QtWidgets.QLabel(self.compile_page)
self.compile_label.setObjectName("compile_label")
self.compile_verticalLayout_1.addWidget(self.compile_label, 0, QtCore.Qt.AlignHCenter)
self.compile_line_1 = QtWidgets.QFrame(self.compile_page)
self.compile_line_1.setFrameShape(QtWidgets.QFrame.HLine)
self.compile_line_1.setFrameShadow(QtWidgets.QFrame.Sunken)
self.compile_line_1.setObjectName("compile_line_1")
self.compile_verticalLayout_1.addWidget(self.compile_line_1)
self.compile_horizontalLayout_1 = QtWidgets.QHBoxLayout()
self.compile_horizontalLayout_1.setObjectName("compile_horizontalLayout_1")
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.compile_horizontalLayout_1.addItem(spacerItem)
self.compileLoss_label = QtWidgets.QLabel(self.compile_page)
self.compileLoss_label.setMinimumSize(QtCore.QSize(55, 22))
self.compileLoss_label.setMaximumSize(QtCore.QSize(70, 25))
self.compileLoss_label.setObjectName("compileLoss_label")
self.compile_horizontalLayout_1.addWidget(self.compileLoss_label)
self.compileLoss_comboBox = QtWidgets.QComboBox(self.compile_page)
self.compileLoss_comboBox.setMinimumSize(QtCore.QSize(110, 22))
self.compileLoss_comboBox.setMaximumSize(QtCore.QSize(150, 25))
self.compileLoss_comboBox.setObjectName("compileLoss_comboBox")
self.compileLoss_comboBox.setMaxVisibleItems(15)
for _ in range(14):
self.compileLoss_comboBox.addItem("")
self.compile_horizontalLayout_1.addWidget(self.compileLoss_comboBox)
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.compile_horizontalLayout_1.addItem(spacerItem1)
self.compile_verticalLayout_1.addLayout(self.compile_horizontalLayout_1)
self.compile_line_2 = QtWidgets.QFrame(self.compile_page)
self.compile_line_2.setFrameShape(QtWidgets.QFrame.HLine)
self.compile_line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
self.compile_line_2.setObjectName("compile_line_2")
self.compile_verticalLayout_1.addWidget(self.compile_line_2)
self.compile_horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.compile_horizontalLayout_2.setObjectName("compile_horizontalLayout_2")
spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.compile_horizontalLayout_2.addItem(spacerItem2)
self.compileOptimizer_label = QtWidgets.QLabel(self.compile_page)
self.compileOptimizer_label.setMinimumSize(QtCore.QSize(55, 22))
self.compileOptimizer_label.setMaximumSize(QtCore.QSize(70, 25))
self.compileOptimizer_label.setObjectName("compileOptimizer_label")
self.compile_horizontalLayout_2.addWidget(self.compileOptimizer_label)
self.compileOptimizer_comboBox = QtWidgets.QComboBox(self.compile_page)
self.compileOptimizer_comboBox.setMinimumSize(QtCore.QSize(110, 22))
self.compileOptimizer_comboBox.setMaximumSize(QtCore.QSize(150, 25))
self.compileOptimizer_comboBox.setObjectName("compileOptimizer_comboBox")
for _ in range(8):
self.compileOptimizer_comboBox.addItem("")
self.compile_horizontalLayout_2.addWidget(self.compileOptimizer_comboBox)
spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.compile_horizontalLayout_2.addItem(spacerItem3)
self.compile_verticalLayout_1.addLayout(self.compile_horizontalLayout_2)
self.compile_line_4 = QtWidgets.QFrame(self.compile_page)
self.compile_line_4.setFrameShape(QtWidgets.QFrame.HLine)
self.compile_line_4.setFrameShadow(QtWidgets.QFrame.Sunken)
self.compile_line_4.setObjectName("compile_line_4")
self.compile_verticalLayout_1.addWidget(self.compile_line_4)
self.compile_verticalLayout_2 = QtWidgets.QVBoxLayout()
self.compile_verticalLayout_2.setObjectName("compile_verticalLayout_2")
self.compileMetrics_label = QtWidgets.QLabel(self.compile_page)
self.compileMetrics_label.setMinimumSize(QtCore.QSize(55, 22))
self.compileMetrics_label.setMaximumSize(QtCore.QSize(70, 25))
self.compileMetrics_label.setAlignment(QtCore.Qt.AlignCenter)
self.compileMetrics_label.setObjectName("compileMetrics_label")
self.compile_verticalLayout_2.addWidget(self.compileMetrics_label, 0, QtCore.Qt.AlignHCenter)
self.checkBox_3 = QtWidgets.QCheckBox(self.compile_page)
self.checkBox_3.setObjectName("checkBox_3")
self.compile_verticalLayout_2.addWidget(self.checkBox_3)
self.checkBox_2 = QtWidgets.QCheckBox(self.compile_page)
self.checkBox_2.setObjectName("checkBox_2")
self.compile_verticalLayout_2.addWidget(self.checkBox_2)
self.checkBox = QtWidgets.QCheckBox(self.compile_page)
self.checkBox.setObjectName("checkBox")
self.compile_verticalLayout_2.addWidget(self.checkBox)
self.compile_horizontalLayout_6 = QtWidgets.QHBoxLayout()
self.compile_horizontalLayout_6.setObjectName("compile_horizontalLayout_6")
self.compile_verticalLayout_3 = QtWidgets.QVBoxLayout()
self.compile_verticalLayout_3.setObjectName("compile_verticalLayout_3")
self.checkBox_5 = QtWidgets.QCheckBox(self.compile_page)
self.checkBox_5.setObjectName("checkBox_5")
self.compile_verticalLayout_3.addWidget(self.checkBox_5)
self.checkBox_6 = QtWidgets.QCheckBox(self.compile_page)
self.checkBox_6.setObjectName("checkBox_6")
self.compile_verticalLayout_3.addWidget(self.checkBox_6)
self.compile_horizontalLayout_6.addLayout(self.compile_verticalLayout_3)
self.metricsK_label = QtWidgets.QLabel(self.compile_page)
self.metricsK_label.setMinimumSize(QtCore.QSize(10, 22))
self.metricsK_label.setMaximumSize(QtCore.QSize(15, 22))
self.metricsK_label.setObjectName("metricsK_label")
self.compile_horizontalLayout_6.addWidget(self.metricsK_label)
self.metricsK_lineEdit = QtWidgets.QLineEdit(self.compile_page)
self.metricsK_lineEdit.setMinimumSize(QtCore.QSize(22, 22))
self.metricsK_lineEdit.setMaximumSize(QtCore.QSize(25, 22))
self.metricsK_lineEdit.setObjectName("metricsK_lineEdit")
self.compile_horizontalLayout_6.addWidget(self.metricsK_lineEdit)
self.compile_verticalLayout_2.addLayout(self.compile_horizontalLayout_6)
self.compile_verticalLayout_1.addLayout(self.compile_verticalLayout_2)
self.compile_line_5 = QtWidgets.QFrame(self.compile_page)
self.compile_line_5.setFrameShape(QtWidgets.QFrame.HLine)
self.compile_line_5.setFrameShadow(QtWidgets.QFrame.Sunken)
self.compile_line_5.setObjectName("compile_line_5")
self.compile_verticalLayout_1.addWidget(self.compile_line_5)
self.compile_horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.compile_horizontalLayout_3.setObjectName("compile_horizontalLayout_3")
self.back_pushButton = QtWidgets.QPushButton(self.compile_page)
self.back_pushButton.setObjectName("back_pushButton")
self.compile_horizontalLayout_3.addWidget(self.back_pushButton)
self.compile_pushButton = QtWidgets.QPushButton(self.compile_page)
self.compile_pushButton.setObjectName("compile_pushButton")
self.compile_horizontalLayout_3.addWidget(self.compile_pushButton)
self.compile_verticalLayout_1.addLayout(self.compile_horizontalLayout_3)
self.compile_gridLayout.addLayout(self.compile_verticalLayout_1, 0, 0, 1, 1)
self.back_pushButton.clicked.connect(self.previouspage)
self.compile_pushButton.clicked.connect(self.compile_func)
self.metricsK_lineEdit.setValidator(self.intOnly)
self.compile_label.setText("Compile Model")
self.compileLoss_label.setText("Loss")
self.compileLoss_comboBox.setItemText(0, "Mean Squared Error")
self.compileLoss_comboBox.setItemText(1, "Mean Absolute Error")
self.compileLoss_comboBox.setItemText(2, "Mean Absolute Percentage Error")
self.compileLoss_comboBox.setItemText(3, "Mean Squared Logarithmic Error")
self.compileLoss_comboBox.setItemText(4, "Squared Hinge")
self.compileLoss_comboBox.setItemText(5, "Hinge")
self.compileLoss_comboBox.setItemText(6, "Categorical Hinge")
self.compileLoss_comboBox.setItemText(7, "Logcosh")
self.compileLoss_comboBox.setItemText(8, "Categorical Crossentropy")
self.compileLoss_comboBox.setItemText(9, "Sparse Categorical Crossentropy")
self.compileLoss_comboBox.setItemText(10, "Binary Crossentropy")
self.compileLoss_comboBox.setItemText(11, "Kullback Leibler Divergence")
self.compileLoss_comboBox.setItemText(12, "Poisson")
self.compileLoss_comboBox.setItemText(13, "Cosine Proximity")
self.compileOptimizer_label.setText("Optimizer")
self.compileOptimizer_comboBox.setItemText(0, "SGD")
self.compileOptimizer_comboBox.setItemText(1, "RMSprop")
self.compileOptimizer_comboBox.setItemText(2, "Adagrad")
self.compileOptimizer_comboBox.setItemText(3, "Adadelta")
self.compileOptimizer_comboBox.setItemText(4, "Adam")
self.compileOptimizer_comboBox.setItemText(5, "Adamax")
self.compileOptimizer_comboBox.setItemText(6, "Nadam")
self.compileOptimizer_comboBox.setItemText(7, "TFOptimizer")
self.compileMetrics_label.setText("Metrics")
self.checkBox_3.setText("Binary Accuracy")
self.checkBox_2.setText("Categorical Accuracy")
self.checkBox.setText("Sparse Categorical\n"+"Accuracy")
self.checkBox_5.setText("Top K Categorical\n"+"Accuracy")
self.checkBox_6.setText("Sparse Top K\n"+"Categorical Accuracy")
self.metricsK_label.setText("K")
self.back_pushButton.setText("Back")
self.compile_pushButton.setText("Compile")
self.compileLoss_comboBox.setCurrentIndex(8)
self.compileOptimizer_comboBox.setCurrentIndex(4)
self.stackedWidget.addWidget(self.compile_page)
def initialize_func(self):
while self.stackedWidget.count() > 1:
# remove the stackedWidget with index 1 until only index 0 (1st widget) remains
self.stackedWidget.removeWidget(self.stackedWidget.widget(1))
if self.cnn_lineEdit.text() != '0':
self.nof_CNNlayers = int(self.cnn_lineEdit.text())
for i in range(self.nof_CNNlayers):
self.cnnpage_constuctor(str(i+1))
if self.lstm_lineEdit != '0':
self.nof_LSTMlayers = int(self.lstm_lineEdit.text())
for i in range(self.nof_LSTMlayers):
self.lstmpage_constuctor(str(i+1))
if self.dense_lineEdit.text!='0':
self.nof_Denselayers = int(self.dense_lineEdit.text())
for i in range(self.nof_Denselayers):
self.densepage_constuctor(str(i+1))
if self.classes_lineEdit.text!='0': #not in ['','0']
# only one time (no loop) of densepage('output')
# in self.densepage_constuctor() if index=output
# units = nof_classes ...
self.nof_Classes = int (self.classes_lineEdit.text())
self.densepage_constuctor('output')
pass
#try:
# self.next_pushButton.setText('Create')
# self.next_pushButton.clicked.connect(self.create_model_func)
#except:
# pass
self.compilepage_constructor()
self.nextpage()
def reset_pushButton_func(self):
self.retranslateUi()
while self.stackedWidget.count() > 1:
# remove the stackedWidget with index 1 until only index 0 (1st widget) remains
self.stackedWidget.removeWidget(self.stackedWidget.widget(1))