pyerualjetwork 2.4.2__py3-none-any.whl → 2.4.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- plan_bi/plan_bi.py +29 -3
- plan_di/plan_di.py +29 -26
- {pyerualjetwork-2.4.2.dist-info → pyerualjetwork-2.4.4.dist-info}/METADATA +1 -1
- pyerualjetwork-2.4.4.dist-info/RECORD +8 -0
- pyerualjetwork-2.4.2.dist-info/RECORD +0 -8
- {pyerualjetwork-2.4.2.dist-info → pyerualjetwork-2.4.4.dist-info}/WHEEL +0 -0
- {pyerualjetwork-2.4.2.dist-info → pyerualjetwork-2.4.4.dist-info}/top_level.txt +0 -0
plan_bi/plan_bi.py
CHANGED
@@ -96,10 +96,16 @@ def fit(
|
|
96
96
|
row = x_train[1].shape[0]
|
97
97
|
col = x_train[1].shape[1]
|
98
98
|
except:
|
99
|
+
|
99
100
|
print(Fore.MAGENTA + 'WARNING: You try train showing but inputs is raveled. x_train inputs to should be reshape for training_show.', infoPLAN + Style.RESET_ALL)
|
100
101
|
|
101
|
-
|
102
|
-
|
102
|
+
try:
|
103
|
+
row, col = find_numbers(len(x_train[0]))
|
104
|
+
|
105
|
+
except:
|
106
|
+
print(Fore.RED + 'ERROR: You try train showing but inputs is raveled. x_train inputs to must be reshape for training_show. Input length cannot be reshaped', infoPLAN + Style.RESET_ALL
|
107
|
+
return 'e'
|
108
|
+
|
103
109
|
for j in range(len(class_count)):
|
104
110
|
|
105
111
|
mat = trained_W[0][j,:].reshape(row, col)
|
@@ -142,9 +148,16 @@ def fit(
|
|
142
148
|
row = x_train[1].shape[0]
|
143
149
|
col = x_train[1].shape[1]
|
144
150
|
except:
|
151
|
+
|
145
152
|
print(Fore.MAGENTA + 'WARNING: You try train showing but inputs is raveled. x_train inputs to should be reshape for training_show.', infoPLAN + Style.RESET_ALL)
|
146
153
|
|
147
|
-
|
154
|
+
try:
|
155
|
+
row, col = find_numbers(len(x_train[0]))
|
156
|
+
|
157
|
+
except:
|
158
|
+
|
159
|
+
print(Fore.RED + 'ERROR: You try train showing but inputs is raveled. x_train inputs to must be reshape for training_show. Input length cannot be reshaped', infoPLAN + Style.RESET_ALL
|
160
|
+
return 'e'
|
148
161
|
|
149
162
|
for j in range(len(class_count)):
|
150
163
|
|
@@ -204,6 +217,19 @@ def weight_normalization(
|
|
204
217
|
|
205
218
|
# FUNCTIONS -----
|
206
219
|
|
220
|
+
def find_numbers(n):
|
221
|
+
if n <= 1:
|
222
|
+
raise ValueError("Parameter 'n' must be greater than 1.")
|
223
|
+
|
224
|
+
for i in range(2, int(n**0.5) + 1):
|
225
|
+
if n % i == 0:
|
226
|
+
factor1 = i
|
227
|
+
factor2 = n // i
|
228
|
+
if factor1 == factor2:
|
229
|
+
return factor1, factor2
|
230
|
+
|
231
|
+
return None
|
232
|
+
|
207
233
|
def weight_identification(
|
208
234
|
layer_count, # int: Number of layers in the neural network.
|
209
235
|
class_count, # int: Number of classes in the classification task.
|
plan_di/plan_di.py
CHANGED
@@ -95,10 +95,18 @@ def fit(
|
|
95
95
|
try:
|
96
96
|
row = x_train[1].shape[0]
|
97
97
|
col = x_train[1].shape[1]
|
98
|
+
|
98
99
|
except:
|
100
|
+
|
99
101
|
print(Fore.MAGENTA + 'WARNING: You try train showing but inputs is raveled. x_train inputs to should be reshape for training_show.', infoPLAN + Style.RESET_ALL)
|
100
102
|
|
101
|
-
|
103
|
+
try:
|
104
|
+
row, col = find_numbers(len(x_train[0]))
|
105
|
+
|
106
|
+
except:
|
107
|
+
print(Fore.RED + 'ERROR: You try train showing but inputs is raveled. x_train inputs to must be reshape for training_show. Input length cannot be reshaped', infoPLAN + Style.RESET_ALL
|
108
|
+
return 'e'
|
109
|
+
|
102
110
|
|
103
111
|
for j in range(len(class_count)):
|
104
112
|
|
@@ -138,12 +146,20 @@ def fit(
|
|
138
146
|
fig, ax = plt.subplots(1, 10, figsize=(18, 14))
|
139
147
|
|
140
148
|
try:
|
149
|
+
|
141
150
|
row = x_train[1].shape[0]
|
142
151
|
col = x_train[1].shape[1]
|
152
|
+
|
143
153
|
except:
|
154
|
+
|
144
155
|
print(Fore.MAGENTA + 'WARNING: You try train showing but inputs is raveled. x_train inputs to should be reshape for training_show.', infoPLAN + Style.RESET_ALL)
|
145
156
|
|
146
|
-
|
157
|
+
try:
|
158
|
+
row, col = find_numbers(len(x_train[0]))
|
159
|
+
|
160
|
+
except:
|
161
|
+
print(Fore.RED + 'ERROR: You try train showing but inputs is raveled. x_train inputs to must be reshape for training_show. Input length cannot be reshaped', infoPLAN + Style.RESET_ALL
|
162
|
+
return 'e'
|
147
163
|
|
148
164
|
for j in range(len(class_count)):
|
149
165
|
|
@@ -182,31 +198,18 @@ def fit(
|
|
182
198
|
|
183
199
|
# FUNCTIONS -----
|
184
200
|
|
185
|
-
def
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
while divisor <= n:
|
190
|
-
if n % divisor == 0:
|
191
|
-
factors.append(divisor)
|
192
|
-
n //= divisor
|
193
|
-
else:
|
194
|
-
divisor += 1
|
195
|
-
|
196
|
-
return factors
|
201
|
+
def find_numbers(n):
|
202
|
+
if n <= 1:
|
203
|
+
raise ValueError("Parameter 'n' must be greater than 1.")
|
197
204
|
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
for factor in factors[1:]:
|
207
|
-
b *= factor
|
208
|
-
|
209
|
-
return a, b
|
205
|
+
for i in range(2, int(n**0.5) + 1):
|
206
|
+
if n % i == 0:
|
207
|
+
factor1 = i
|
208
|
+
factor2 = n // i
|
209
|
+
if factor1 == factor2:
|
210
|
+
return factor1, factor2
|
211
|
+
|
212
|
+
return None
|
210
213
|
|
211
214
|
def weight_normalization(
|
212
215
|
W,
|
@@ -0,0 +1,8 @@
|
|
1
|
+
plan_bi/__init__.py,sha256=kHnuGDOKyMHQqeX49ToUUsdZckh9RPuyADhYw0SrmIo,514
|
2
|
+
plan_bi/plan_bi.py,sha256=Xn-Tpxse6llDRsilb-k9JAElvRUDvdtQ3B4fnW4s5EA,53602
|
3
|
+
plan_di/__init__.py,sha256=DJzUsYj-tgbeewoGz-K9nfGsKqrRFUxIr_z-NgqySBk,505
|
4
|
+
plan_di/plan_di.py,sha256=6Jml4SeYbM7mNCNY-gJiamsqsy7HNZsDjOBYpzCHhuo,51118
|
5
|
+
pyerualjetwork-2.4.4.dist-info/METADATA,sha256=BxWIsiPEgRTrFXXVyQ_wGkTYURkAL5Q6X2YpSPKFBrI,309
|
6
|
+
pyerualjetwork-2.4.4.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
7
|
+
pyerualjetwork-2.4.4.dist-info/top_level.txt,sha256=aaXSOcnD62fbXG1x7tw4nV50Qxx9g9zDNLK7OD4BdPE,16
|
8
|
+
pyerualjetwork-2.4.4.dist-info/RECORD,,
|
@@ -1,8 +0,0 @@
|
|
1
|
-
plan_bi/__init__.py,sha256=kHnuGDOKyMHQqeX49ToUUsdZckh9RPuyADhYw0SrmIo,514
|
2
|
-
plan_bi/plan_bi.py,sha256=31YsVfHNxIwnn7q6tAA4v2nyfSanfxBM7Wt7Z2ptyhI,52589
|
3
|
-
plan_di/__init__.py,sha256=DJzUsYj-tgbeewoGz-K9nfGsKqrRFUxIr_z-NgqySBk,505
|
4
|
-
plan_di/plan_di.py,sha256=izbP2BuixM2bUumACPXYE66Wj6LnVbuiH3NXLMrN2EY,50514
|
5
|
-
pyerualjetwork-2.4.2.dist-info/METADATA,sha256=Ege0t_siyKePfxhYLb3vhdic5wjxkD3QriA2XbttbiY,309
|
6
|
-
pyerualjetwork-2.4.2.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
7
|
-
pyerualjetwork-2.4.2.dist-info/top_level.txt,sha256=aaXSOcnD62fbXG1x7tw4nV50Qxx9g9zDNLK7OD4BdPE,16
|
8
|
-
pyerualjetwork-2.4.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|