forked from michaelbrownid/tfccs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstruct.py
53 lines (47 loc) · 1.48 KB
/
struct.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
import random
class struct:
################################
def __init__(self):
#random.seed(42)
pass
################################
def old(self):
tmp = {}
tmp["P_0NumKern"] = 8
tmp["P_1NumKern"] = 8
tmp["P_1XKern"] = 16
tmp["P_1YKern"] = 1
return(tmp)
################################
def rnd1(self):
tmp = {}
tmp["P_0NumKern"] = random.randint(8,32)
tmp["P_1NumKern"] = random.randint(2,8)
tmp["P_1XKern"] = random.randint(8,16)
tmp["P_1YKern"] = random.randint(1,8)
return(tmp)
################################
def fixed2(self):
tmp = {}
tmp["P_0NumKern"] = 25
tmp["LengthsNumKern"] = 33
tmp["LengthsXKern"] = 1
tmp["LengthsYKern"] = 33
return(tmp)
################################
def oldfoobar(self):
"""Wanted to exec(myexec, globals(),locals())
"""
return("""
global inputs
global x
global bottle
global predictionsHPLEN
global predictionsHPID
inputs = KK.layers.Input(shape=(args.rows,args.cols,args.baseinfo))
x = KK.layers.Conv2D(8, kernel_size= (1, 6), strides=(1,5), activation='relu')(inputs)
x = KK.layers.Conv2D(8, (16, 1), activation='relu')(x)
bottle = KK.layers.Flatten()(x) # This is now the bottleneck
predictionsHPLEN = KK.layers.Dense(args.hpdist, activation='softmax')(bottle)
predictionsHPID = KK.layers.Dense(4, activation='softmax')(bottle)
""")