Skip to content

Commit 4b42421

Browse files
github-actionsgithub-actions
github-actions
authored and
github-actions
committed
fixup! Format Python code with psf/black push
1 parent 75f52d2 commit 4b42421

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

neural_network/gan.py

+18-8
Original file line numberDiff line numberDiff line change
@@ -75,28 +75,34 @@ def plot(samples):
7575
print("--------- Declare Hyper Parameters ----------")
7676
# 2. Declare Weights
7777
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
7980
)
8081
# D_b1 = np.random.normal(size=(128),scale=(1. / np.sqrt(128 / 2.))) *0.002
8182
D_b1 = np.zeros(hidden_input)
8283

8384
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+
)
8588
* 0.002
8689
)
8790
# D_b2 = np.random.normal(size=(1),scale=(1. / np.sqrt(1 / 2.))) *0.002
8891
D_b2 = np.zeros(1)
8992

9093
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+
)
9297
* 0.002
9398
)
9499
# G_b1 = np.random.normal(size=(128),scale=(1. / np.sqrt(128 / 2.))) *0.002
95100
G_b1 = np.zeros(hidden_input)
96101

97102
G_W2 = (
98103
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)),
100106
)
101107
* 0.002
102108
)
@@ -105,7 +111,8 @@ def plot(samples):
105111

106112
G_W3 = (
107113
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)),
109116
)
110117
* 0.002
111118
)
@@ -114,7 +121,8 @@ def plot(samples):
114121

115122
G_W4 = (
116123
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)),
118126
)
119127
* 0.002
120128
)
@@ -123,7 +131,8 @@ def plot(samples):
123131

124132
G_W5 = (
125133
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)),
127136
)
128137
* 0.002
129138
)
@@ -132,7 +141,8 @@ def plot(samples):
132141

133142
G_W6 = (
134143
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)),
136146
)
137147
* 0.002
138148
)

0 commit comments

Comments
 (0)