pyerualjetwork 2.5.7__py3-none-any.whl → 2.5.9__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/plan.py +28 -18
- {pyerualjetwork-2.5.7.dist-info → pyerualjetwork-2.5.9.dist-info}/METADATA +1 -1
- pyerualjetwork-2.5.9.dist-info/RECORD +6 -0
- pyerualjetwork-2.5.7.dist-info/RECORD +0 -6
- {pyerualjetwork-2.5.7.dist-info → pyerualjetwork-2.5.9.dist-info}/WHEEL +0 -0
- {pyerualjetwork-2.5.7.dist-info → pyerualjetwork-2.5.9.dist-info}/top_level.txt +0 -0
plan/plan.py
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
|
1
2
|
# -*- coding: utf-8 -*-
|
2
3
|
"""
|
3
4
|
Created on Tue Jun 18 23:32:16 2024
|
@@ -42,8 +43,8 @@ def fit(
|
|
42
43
|
y_train: List[Union[int, float]], # At least two.. and one hot encoded
|
43
44
|
show_training,
|
44
45
|
show_count= None,
|
45
|
-
val_count= None,
|
46
46
|
val= None,
|
47
|
+
val_count= None,
|
47
48
|
x_val= None,
|
48
49
|
y_val= None,
|
49
50
|
activation_potential=None # (float): Input activation potential (optional)
|
@@ -186,9 +187,13 @@ def fit(
|
|
186
187
|
if index != 0:
|
187
188
|
plt.close(fig)
|
188
189
|
|
189
|
-
|
190
|
+
if row != 0:
|
191
|
+
|
192
|
+
fig, ax = plt.subplots(1, len(class_count), figsize=(18, 14))
|
190
193
|
|
191
|
-
|
194
|
+
else:
|
195
|
+
|
196
|
+
fig, ax = plt.subplots(1, 1, figsize=(18, 14))
|
192
197
|
|
193
198
|
for j in range(len(class_count)):
|
194
199
|
|
@@ -199,26 +204,32 @@ def fit(
|
|
199
204
|
suptitle_info = 'Neurons Learning Progress: % '
|
200
205
|
title_info = f'{j+1}. Neuron'
|
201
206
|
|
207
|
+
mat = trained_W[0][j,:].reshape(row, col)
|
208
|
+
|
209
|
+
ax[j].imshow(mat, interpolation='sinc', cmap='viridis')
|
210
|
+
|
211
|
+
ax[j].set_aspect('equal')
|
212
|
+
|
213
|
+
ax[j].set_xticks([])
|
214
|
+
ax[j].set_yticks([])
|
215
|
+
ax[j].set_title(title_info)
|
216
|
+
|
202
217
|
else:
|
203
218
|
|
204
219
|
mat = trained_W[0]
|
220
|
+
ax.imshow(mat, interpolation='sinc', cmap='viridis')
|
205
221
|
suptitle_info = 'Weight Learning Progress: % '
|
206
|
-
j = 0
|
207
222
|
title_info = 'Weight Matrix Of Fex Layer'
|
208
223
|
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
ax[j].set_xticks([])
|
213
|
-
ax[j].set_yticks([])
|
214
|
-
ax[j].set_title(title_info)
|
215
|
-
|
216
|
-
progress_status = f"{progress:.1f}"
|
217
|
-
fig.suptitle(suptitle_info + progress_status)
|
218
|
-
plt.draw()
|
219
|
-
plt.pause(0.1)
|
220
|
-
|
224
|
+
|
225
|
+
|
221
226
|
|
227
|
+
progress_status = f"{progress:.1f}"
|
228
|
+
fig.suptitle(suptitle_info + progress_status)
|
229
|
+
plt.draw()
|
230
|
+
plt.pause(0.1)
|
231
|
+
|
232
|
+
|
222
233
|
W = weight_identification(
|
223
234
|
len(layers) - 1, len(class_count), neurons, x_train_size)
|
224
235
|
|
@@ -297,7 +308,7 @@ def shape_control(x_train):
|
|
297
308
|
|
298
309
|
except:
|
299
310
|
|
300
|
-
print(Fore.
|
311
|
+
print(Fore.MAGENTA + 'WARNING: Input length cannot be reshaped. Neurons learning progression cannot be draw, weight learning progress drwaing started.' + Style.RESET_ALL)
|
301
312
|
return [0, 0]
|
302
313
|
|
303
314
|
return row, col
|
@@ -1685,4 +1696,3 @@ def get_preds():
|
|
1685
1696
|
def get_acc():
|
1686
1697
|
|
1687
1698
|
return 2
|
1688
|
-
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pyerualjetwork
|
3
|
-
Version: 2.5.
|
3
|
+
Version: 2.5.9
|
4
4
|
Summary: New optional parameters added for fit function, x_val, y_val show_count, val_count, val. For more information please read user document
|
5
5
|
Author: Hasan Can Beydili
|
6
6
|
Author-email: tchasancan@gmail.com
|
@@ -0,0 +1,6 @@
|
|
1
|
+
plan/__init__.py,sha256=gmaz8lnQfl18MbOQwabBUPmShajK5S99jfyY-hQe8tc,502
|
2
|
+
plan/plan.py,sha256=IM0dEsGiooGbRUhrCR3JBlZQ7oF10tnMfUEQqUxtAyU,56167
|
3
|
+
pyerualjetwork-2.5.9.dist-info/METADATA,sha256=u8ePHpaRB3I5QO7bjK7iKR4ffVp6qtg1LN8WjLT_FcM,357
|
4
|
+
pyerualjetwork-2.5.9.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
5
|
+
pyerualjetwork-2.5.9.dist-info/top_level.txt,sha256=G0Al3HuNJ88434XneyDtRKAIUaLCizOFYFYNhd7e2OM,5
|
6
|
+
pyerualjetwork-2.5.9.dist-info/RECORD,,
|
@@ -1,6 +0,0 @@
|
|
1
|
-
plan/__init__.py,sha256=gmaz8lnQfl18MbOQwabBUPmShajK5S99jfyY-hQe8tc,502
|
2
|
-
plan/plan.py,sha256=PEmoyvZidNWiNQTanaTbFBP9dlrAD0ZqU6-83wJXPV0,55726
|
3
|
-
pyerualjetwork-2.5.7.dist-info/METADATA,sha256=BjDzrhxLKzSODDlgEr8IFeRoypwj8tmBaN3GyNot3Ww,357
|
4
|
-
pyerualjetwork-2.5.7.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
5
|
-
pyerualjetwork-2.5.7.dist-info/top_level.txt,sha256=G0Al3HuNJ88434XneyDtRKAIUaLCizOFYFYNhd7e2OM,5
|
6
|
-
pyerualjetwork-2.5.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|