pyerualjetwork 2.2.5__py3-none-any.whl → 2.2.7__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 +2 -2
- plan_di/plan_di.py +6 -10
- {pyerualjetwork-2.2.5.dist-info → pyerualjetwork-2.2.7.dist-info}/METADATA +1 -1
- pyerualjetwork-2.2.7.dist-info/RECORD +8 -0
- pyerualjetwork-2.2.5.dist-info/RECORD +0 -8
- {pyerualjetwork-2.2.5.dist-info → pyerualjetwork-2.2.7.dist-info}/WHEEL +0 -0
- {pyerualjetwork-2.2.5.dist-info → pyerualjetwork-2.2.7.dist-info}/top_level.txt +0 -0
plan_bi/plan_bi.py
CHANGED
@@ -61,6 +61,7 @@ def fit(
|
|
61
61
|
W = weight_identification(len(layers) - 1,len(class_count),neurons,x_train_size)
|
62
62
|
trained_W = [1] * len(W)
|
63
63
|
print(Fore.GREEN + "Train Started with 0 ERROR" + Style.RESET_ALL,)
|
64
|
+
y = decode_one_hot(y_train)
|
64
65
|
start_time = time.time()
|
65
66
|
for index, inp in enumerate(x_train):
|
66
67
|
uni_start_time = time.time()
|
@@ -76,11 +77,10 @@ def fit(
|
|
76
77
|
|
77
78
|
for Lindex, Layer in enumerate(layers):
|
78
79
|
|
79
|
-
y = np.argmax(y_train[index])
|
80
80
|
neural_layer = normalization(neural_layer)
|
81
81
|
|
82
82
|
if Layer == 'fex':
|
83
|
-
W[Lindex] = fex(neural_layer, W[Lindex], activation_potential, True, y)
|
83
|
+
W[Lindex] = fex(neural_layer, W[Lindex], activation_potential, True, y[index])
|
84
84
|
|
85
85
|
|
86
86
|
for i, w in enumerate(W):
|
plan_di/plan_di.py
CHANGED
@@ -1,6 +1,4 @@
|
|
1
1
|
|
2
|
-
import time
|
3
|
-
from colorama import Fore
|
4
2
|
"""
|
5
3
|
Created on Thu Jun 12 00:00:00 2024
|
6
4
|
|
@@ -65,11 +63,12 @@ def fit(
|
|
65
63
|
trained_W = [1] * len(W)
|
66
64
|
print(Fore.GREEN + "Train Started with 0 ERROR" + Style.RESET_ALL)
|
67
65
|
start_time = time.time()
|
66
|
+
y = decode_one_hot(y_train)
|
68
67
|
for index, inp in enumerate(x_train):
|
69
68
|
uni_start_time = time.time()
|
70
69
|
inp = np.array(inp)
|
71
70
|
inp = inp.ravel()
|
72
|
-
|
71
|
+
|
73
72
|
if x_train_size != len(inp):
|
74
73
|
print(Fore.RED + "ERROR304: All input matrices or vectors in x_train list, must be same size. from: fit",
|
75
74
|
infoPLAN + Style.RESET_ALL)
|
@@ -81,12 +80,11 @@ def fit(
|
|
81
80
|
|
82
81
|
neural_layer = normalization(neural_layer)
|
83
82
|
|
84
|
-
y = np.argmax(y_train[index])
|
85
83
|
if Layer == 'fex':
|
86
|
-
W[Lindex] = fex(neural_layer, W[Lindex], True, y)
|
84
|
+
W[Lindex] = fex(neural_layer, W[Lindex], True, y[index])
|
87
85
|
|
88
86
|
for i, w in enumerate(W):
|
89
|
-
|
87
|
+
trained_W[i] = trained_W[i] + w
|
90
88
|
|
91
89
|
W = weight_identification(
|
92
90
|
len(layers) - 1, len(class_count), neurons, x_train_size)
|
@@ -121,7 +119,7 @@ def fit(
|
|
121
119
|
|
122
120
|
elif calculating_est > 3600:
|
123
121
|
print('Total training time(h): ', calculating_est/3600)
|
124
|
-
|
122
|
+
|
125
123
|
return trained_W
|
126
124
|
|
127
125
|
# FUNCTIONS -----
|
@@ -520,7 +518,6 @@ def save_model(model_name,
|
|
520
518
|
model_name (str): Name of the model.
|
521
519
|
model_type (str): Type of the model.(options: PLAN)
|
522
520
|
class_count (int): Number of classes.
|
523
|
-
activation_potential (float): Activation potential.
|
524
521
|
test_acc (float): Test accuracy of the model.
|
525
522
|
weights_type (str): Type of weights to save (options: 'txt', 'npy', 'mat').
|
526
523
|
WeightFormat (str): Format of the weights (options: 'd', 'f', 'raw').
|
@@ -1315,5 +1312,4 @@ def get_preds():
|
|
1315
1312
|
|
1316
1313
|
def get_acc():
|
1317
1314
|
|
1318
|
-
return 2
|
1319
|
-
|
1315
|
+
return 2
|
@@ -0,0 +1,8 @@
|
|
1
|
+
plan_bi/__init__.py,sha256=rzDe7yWvNlwDVE6xSw8Qk51itcxT6EDBj7iiOeycxMw,475
|
2
|
+
plan_bi/plan_bi.py,sha256=ZK2rwYVgYxHygwmgUvb8G1cQ8AHPRm6e2yVHgb9X5Eo,45416
|
3
|
+
plan_di/__init__.py,sha256=Omxc07PXPQZOrXBD3PJQT6sPdni6NMykyiQgKVL_IZ0,466
|
4
|
+
plan_di/plan_di.py,sha256=nWUc3D9yTDQ6V1TQAGH4Q9F4yKJIndKYGGQPqtysNOU,42786
|
5
|
+
pyerualjetwork-2.2.7.dist-info/METADATA,sha256=_XpAwKRGokLPyY5Z5wW3pXLUF9nKFgWDaw510HVKa6E,325
|
6
|
+
pyerualjetwork-2.2.7.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
7
|
+
pyerualjetwork-2.2.7.dist-info/top_level.txt,sha256=aaXSOcnD62fbXG1x7tw4nV50Qxx9g9zDNLK7OD4BdPE,16
|
8
|
+
pyerualjetwork-2.2.7.dist-info/RECORD,,
|
@@ -1,8 +0,0 @@
|
|
1
|
-
plan_bi/__init__.py,sha256=rzDe7yWvNlwDVE6xSw8Qk51itcxT6EDBj7iiOeycxMw,475
|
2
|
-
plan_bi/plan_bi.py,sha256=oUEZIGG8Y1nTNED33kAy2RrlW5LQIFPnwxwM8_O3QOQ,45419
|
3
|
-
plan_di/__init__.py,sha256=Omxc07PXPQZOrXBD3PJQT6sPdni6NMykyiQgKVL_IZ0,466
|
4
|
-
plan_di/plan_di.py,sha256=HQqc_jheT9x8NkJ9_Fvqa8EN4ehkExVy3RqvqAwPwgU,42874
|
5
|
-
pyerualjetwork-2.2.5.dist-info/METADATA,sha256=X7c4sZ142CbFtk_c7juhftpO1yjzwHCa9Jt4PiQuwmQ,325
|
6
|
-
pyerualjetwork-2.2.5.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
7
|
-
pyerualjetwork-2.2.5.dist-info/top_level.txt,sha256=aaXSOcnD62fbXG1x7tw4nV50Qxx9g9zDNLK7OD4BdPE,16
|
8
|
-
pyerualjetwork-2.2.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|