@@ -75,28 +75,34 @@ def plot(samples):
75
75
print ("--------- Declare Hyper Parameters ----------" )
76
76
# 2. Declare Weights
77
77
D_W1 = (
78
- np .random .normal (size = (784 , hidden_input ), scale = (1.0 / np .sqrt (784 / 2.0 ))) * 0.002
78
+ np .random .normal (size = (784 , hidden_input ), scale = (1.0 / np .sqrt (784 / 2.0 )))
79
+ * 0.002
79
80
)
80
81
# D_b1 = np.random.normal(size=(128),scale=(1. / np.sqrt(128 / 2.))) *0.002
81
82
D_b1 = np .zeros (hidden_input )
82
83
83
84
D_W2 = (
84
- np .random .normal (size = (hidden_input , 1 ), scale = (1.0 / np .sqrt (hidden_input / 2.0 )))
85
+ np .random .normal (
86
+ size = (hidden_input , 1 ), scale = (1.0 / np .sqrt (hidden_input / 2.0 ))
87
+ )
85
88
* 0.002
86
89
)
87
90
# D_b2 = np.random.normal(size=(1),scale=(1. / np.sqrt(1 / 2.))) *0.002
88
91
D_b2 = np .zeros (1 )
89
92
90
93
G_W1 = (
91
- np .random .normal (size = (G_input , hidden_input ), scale = (1.0 / np .sqrt (G_input / 2.0 )))
94
+ np .random .normal (
95
+ size = (G_input , hidden_input ), scale = (1.0 / np .sqrt (G_input / 2.0 ))
96
+ )
92
97
* 0.002
93
98
)
94
99
# G_b1 = np.random.normal(size=(128),scale=(1. / np.sqrt(128 / 2.))) *0.002
95
100
G_b1 = np .zeros (hidden_input )
96
101
97
102
G_W2 = (
98
103
np .random .normal (
99
- size = (hidden_input , hidden_input2 ), scale = (1.0 / np .sqrt (hidden_input / 2.0 ))
104
+ size = (hidden_input , hidden_input2 ),
105
+ scale = (1.0 / np .sqrt (hidden_input / 2.0 )),
100
106
)
101
107
* 0.002
102
108
)
@@ -105,7 +111,8 @@ def plot(samples):
105
111
106
112
G_W3 = (
107
113
np .random .normal (
108
- size = (hidden_input2 , hidden_input3 ), scale = (1.0 / np .sqrt (hidden_input2 / 2.0 ))
114
+ size = (hidden_input2 , hidden_input3 ),
115
+ scale = (1.0 / np .sqrt (hidden_input2 / 2.0 )),
109
116
)
110
117
* 0.002
111
118
)
@@ -114,7 +121,8 @@ def plot(samples):
114
121
115
122
G_W4 = (
116
123
np .random .normal (
117
- size = (hidden_input3 , hidden_input4 ), scale = (1.0 / np .sqrt (hidden_input3 / 2.0 ))
124
+ size = (hidden_input3 , hidden_input4 ),
125
+ scale = (1.0 / np .sqrt (hidden_input3 / 2.0 )),
118
126
)
119
127
* 0.002
120
128
)
@@ -123,7 +131,8 @@ def plot(samples):
123
131
124
132
G_W5 = (
125
133
np .random .normal (
126
- size = (hidden_input4 , hidden_input5 ), scale = (1.0 / np .sqrt (hidden_input4 / 2.0 ))
134
+ size = (hidden_input4 , hidden_input5 ),
135
+ scale = (1.0 / np .sqrt (hidden_input4 / 2.0 )),
127
136
)
128
137
* 0.002
129
138
)
@@ -132,7 +141,8 @@ def plot(samples):
132
141
133
142
G_W6 = (
134
143
np .random .normal (
135
- size = (hidden_input5 , hidden_input6 ), scale = (1.0 / np .sqrt (hidden_input5 / 2.0 ))
144
+ size = (hidden_input5 , hidden_input6 ),
145
+ scale = (1.0 / np .sqrt (hidden_input5 / 2.0 )),
136
146
)
137
147
* 0.002
138
148
)
0 commit comments