pyerualjetwork 4.3.9b0__py3-none-any.whl → 4.3.9b2__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.
- pyerualjetwork/__init__.py +1 -1
- pyerualjetwork/plan.py +8 -6
- pyerualjetwork/plan_cuda.py +8 -6
- {pyerualjetwork-4.3.9b0.dist-info → pyerualjetwork-4.3.9b2.dist-info}/METADATA +1 -1
- {pyerualjetwork-4.3.9b0.dist-info → pyerualjetwork-4.3.9b2.dist-info}/RECORD +7 -7
- {pyerualjetwork-4.3.9b0.dist-info → pyerualjetwork-4.3.9b2.dist-info}/WHEEL +0 -0
- {pyerualjetwork-4.3.9b0.dist-info → pyerualjetwork-4.3.9b2.dist-info}/top_level.txt +0 -0
pyerualjetwork/__init__.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
__version__ = "4.3.
|
1
|
+
__version__ = "4.3.9b2"
|
2
2
|
__update__ = "* Changes: https://github.com/HCB06/PyerualJetwork/blob/main/CHANGES\n* PyerualJetwork Homepage: https://github.com/HCB06/PyerualJetwork/tree/main\n* PyerualJetwork document: https://github.com/HCB06/PyerualJetwork/blob/main/Welcome_to_PyerualJetwork/PYERUALJETWORK_USER_MANUEL_AND_LEGAL_INFORMATION(EN).pdf\n* YouTube tutorials: https://www.youtube.com/@HasanCanBeydili"
|
3
3
|
|
4
4
|
def print_version(__version__):
|
pyerualjetwork/plan.py
CHANGED
@@ -44,7 +44,7 @@ def fit(
|
|
44
44
|
y_train,
|
45
45
|
activation_potentiation=['linear'],
|
46
46
|
W=None,
|
47
|
-
|
47
|
+
auto_normalization=False,
|
48
48
|
dtype=np.float32
|
49
49
|
):
|
50
50
|
"""
|
@@ -60,7 +60,7 @@ def fit(
|
|
60
60
|
|
61
61
|
W (numpy.ndarray): If you want to re-continue or update model
|
62
62
|
|
63
|
-
|
63
|
+
auto_normalization (bool, optional): Normalization may solves overflow problem. Default: False
|
64
64
|
|
65
65
|
dtype (numpy.dtype): Data type for the arrays. np.float32 by default. Example: np.float64 or np.float16. [fp32 for balanced devices, fp64 for strong devices, fp16 for weak devices: not reccomended!] (optional)
|
66
66
|
|
@@ -74,8 +74,8 @@ def fit(
|
|
74
74
|
|
75
75
|
weight = np.zeros((len(y_train[0]), len(x_train[0].ravel()))).astype(dtype, copy=False) if W is None else W
|
76
76
|
|
77
|
-
if
|
78
|
-
elif
|
77
|
+
if auto_normalization is True: x_train = normalization(apply_activation(x_train, activation_potentiation))
|
78
|
+
elif auto_normalization is False: x_train = apply_activation(x_train, activation_potentiation)
|
79
79
|
else: raise ValueError('normalization parameter only be True or False')
|
80
80
|
|
81
81
|
weight += y_train.T @ x_train
|
@@ -84,7 +84,7 @@ def fit(
|
|
84
84
|
|
85
85
|
|
86
86
|
def learner(x_train, y_train, optimizer, fit_start, strategy='accuracy', gen=None, batch_size=1, pop_size=None,
|
87
|
-
neural_web_history=False, show_current_activations=False,
|
87
|
+
neural_web_history=False, show_current_activations=False, auto_normalization=False,
|
88
88
|
neurons_history=False, early_stop=False, loss='categorical_crossentropy', show_history=False,
|
89
89
|
interval=33.33, target_acc=None, target_loss=None,
|
90
90
|
start_this_act=None, start_this_W=None, dtype=np.float32):
|
@@ -136,6 +136,8 @@ def learner(x_train, y_train, optimizer, fit_start, strategy='accuracy', gen=Non
|
|
136
136
|
|
137
137
|
show_history (bool, optional): If True, displays the training history after optimization. Default is False.
|
138
138
|
|
139
|
+
auto_normalization (bool, optional): Normalization may solves overflow problem. Default: False
|
140
|
+
|
139
141
|
loss (str, optional): For visualizing and monitoring. PLAN neural networks doesn't need any loss function in training. options: ('categorical_crossentropy' or 'binary_crossentropy') Default is 'categorical_crossentropy'.
|
140
142
|
|
141
143
|
interval (int, optional): The interval at which evaluations are conducted during training. (33.33 = 30 FPS, 16.67 = 60 FPS) Default is 100.
|
@@ -229,7 +231,7 @@ def learner(x_train, y_train, optimizer, fit_start, strategy='accuracy', gen=Non
|
|
229
231
|
|
230
232
|
if fit_start is True and i == 0 and j < activation_potentiation_len:
|
231
233
|
act_pop[j] = activation_potentiation[j]
|
232
|
-
W = fit(x_train_batch, y_train_batch, activation_potentiation=act_pop[j],
|
234
|
+
W = fit(x_train_batch, y_train_batch, activation_potentiation=act_pop[j], auto_normalization=auto_normalization, dtype=dtype)
|
233
235
|
weight_pop[j] = W
|
234
236
|
|
235
237
|
model = evaluate(x_train_batch, y_train_batch, W=weight_pop[j], activation_potentiation=act_pop[j])
|
pyerualjetwork/plan_cuda.py
CHANGED
@@ -44,7 +44,7 @@ def fit(
|
|
44
44
|
y_train,
|
45
45
|
activation_potentiation=['linear'],
|
46
46
|
W=None,
|
47
|
-
|
47
|
+
auto_normalization=False,
|
48
48
|
dtype=cp.float32
|
49
49
|
):
|
50
50
|
"""
|
@@ -60,7 +60,7 @@ def fit(
|
|
60
60
|
|
61
61
|
W (cupy.ndarray, optional): If you want to re-continue or update model
|
62
62
|
|
63
|
-
|
63
|
+
auto_normalization (bool, optional): Normalization may solves overflow problem. Default: False
|
64
64
|
|
65
65
|
dtype (cupy.dtype, optional): Data type for the arrays. cp.float32 by default. Example: cp.float64 or cp.float16. [fp32 for balanced devices, fp64 for strong devices, fp16 for weak devices: not reccomended!] (optional)
|
66
66
|
|
@@ -73,8 +73,8 @@ def fit(
|
|
73
73
|
|
74
74
|
weight = cp.zeros((len(y_train[0]), len(x_train[0].ravel()))).astype(dtype, copy=False) if W is None else W
|
75
75
|
|
76
|
-
if
|
77
|
-
elif
|
76
|
+
if auto_normalization is True: x_train = normalization(apply_activation(x_train, activation_potentiation))
|
77
|
+
elif auto_normalization is False: x_train = apply_activation(x_train, activation_potentiation)
|
78
78
|
else: raise ValueError('normalization parameter only be True or False')
|
79
79
|
|
80
80
|
weight += y_train.T @ x_train
|
@@ -83,7 +83,7 @@ def fit(
|
|
83
83
|
|
84
84
|
|
85
85
|
def learner(x_train, y_train, optimizer, fit_start, strategy='accuracy', gen=None, batch_size=1, pop_size=None,
|
86
|
-
neural_web_history=False, show_current_activations=False,
|
86
|
+
neural_web_history=False, show_current_activations=False, auto_normalization=False,
|
87
87
|
neurons_history=False, early_stop=False, loss='categorical_crossentropy', show_history=False,
|
88
88
|
interval=33.33, target_acc=None, target_loss=None,
|
89
89
|
start_this_act=None, start_this_W=None, dtype=cp.float32, memory='gpu'):
|
@@ -136,6 +136,8 @@ def learner(x_train, y_train, optimizer, fit_start, strategy='accuracy', gen=Non
|
|
136
136
|
|
137
137
|
loss (str, optional): For visualizing and monitoring. PLAN neural networks doesn't need any loss function in training. options: ('categorical_crossentropy' or 'binary_crossentropy') Default is 'categorical_crossentropy'.
|
138
138
|
|
139
|
+
auto_normalization (bool, optional): Normalization may solves overflow problem. Default: False
|
140
|
+
|
139
141
|
interval (int, optional): The interval at which evaluations are conducted during training. (33.33 = 30 FPS, 16.67 = 60 FPS) Default is 100.
|
140
142
|
|
141
143
|
target_acc (int, optional): The target accuracy to stop training early when achieved. Default is None.
|
@@ -240,7 +242,7 @@ def learner(x_train, y_train, optimizer, fit_start, strategy='accuracy', gen=Non
|
|
240
242
|
|
241
243
|
if fit_start is True and i == 0 and j < activation_potentiation_len:
|
242
244
|
act_pop[j] = activation_potentiation[j]
|
243
|
-
W = fit(x_train_batch, y_train_batch, activation_potentiation=act_pop[
|
245
|
+
W = fit(x_train_batch, y_train_batch, activation_potentiation=act_pop[j], auto_normalization=auto_normalization, dtype=dtype)
|
244
246
|
weight_pop[j] = W
|
245
247
|
|
246
248
|
model = evaluate(x_train_batch, y_train_batch, W=weight_pop[j], activation_potentiation=act_pop[j])
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pyerualjetwork
|
3
|
-
Version: 4.3.
|
3
|
+
Version: 4.3.9b2
|
4
4
|
Summary: PyerualJetwork is a machine learning library supported with GPU(CUDA) acceleration written in Python for professionals and researchers including with PLAN algorithm, PLANEAT algorithm (genetic optimization). Also includes data pre-process and memory manegament
|
5
5
|
Author: Hasan Can Beydili
|
6
6
|
Author-email: tchasancan@gmail.com
|
@@ -1,4 +1,4 @@
|
|
1
|
-
pyerualjetwork/__init__.py,sha256=
|
1
|
+
pyerualjetwork/__init__.py,sha256=Xq17ymoPeZ0UU0jM2XmXY2oG85-nGR6-4scDvbFco4I,641
|
2
2
|
pyerualjetwork/activation_functions.py,sha256=bKf00lsuuLJNO-4vVp4OqBi4zJ-qZ8L3v-vl52notkY,7721
|
3
3
|
pyerualjetwork/activation_functions_cuda.py,sha256=5y1Ti3GDfDteQDCUmODwe7tAyDAUlDTKmIikChQ8d6g,7772
|
4
4
|
pyerualjetwork/data_operations.py,sha256=Flteouu6rfSo2uHMqBHuzO02dXmbNa-I5qWmUpGTZ5Y,14760
|
@@ -11,14 +11,14 @@ pyerualjetwork/metrics.py,sha256=q7MkhnZDRbCjFBDDfUgrl8lBYnUT_1ro1LxeBq105pI,607
|
|
11
11
|
pyerualjetwork/metrics_cuda.py,sha256=73h9GC7XwmnFCVzFEEiPQfF8CwHIz2wsCbxpZrJtYgw,5061
|
12
12
|
pyerualjetwork/model_operations.py,sha256=MCSCNYiiICRVZITobtS3ZIWmH5Q9gjyELuH32sAdgg4,12649
|
13
13
|
pyerualjetwork/model_operations_cuda.py,sha256=NT01BK5nrDYE7H1x3KnSI8gmx0QTGGB0mP_LqEb1uuU,13157
|
14
|
-
pyerualjetwork/plan.py,sha256=
|
15
|
-
pyerualjetwork/plan_cuda.py,sha256=
|
14
|
+
pyerualjetwork/plan.py,sha256=yqtiPUTpvO-Ty8SRJd5RFdbIKMgGGGkMVxdgbVHhfjQ,23503
|
15
|
+
pyerualjetwork/plan_cuda.py,sha256=4_AXa1IvDcqvHiK7CKbQXJBlO-UP6eVtK-ubDHmLGWk,24395
|
16
16
|
pyerualjetwork/planeat.py,sha256=Lq5R0aMS4UIdZdbUKsKDv5g0WLwYryomR3IQYb8vAa4,37573
|
17
17
|
pyerualjetwork/planeat_cuda.py,sha256=SG7Oq1F2m3lJBbG9cgmu7q_ApmwSn2SvTpcbtEVAoDE,37630
|
18
18
|
pyerualjetwork/ui.py,sha256=wu2BhU1k-w3Kcho5Jtq4SEKe68ftaUeRGneUOSCVDjU,575
|
19
19
|
pyerualjetwork/visualizations.py,sha256=08O5uEewuYiovZRX1uHWEHjn19LcnhndWYvqVN74xs0,28290
|
20
20
|
pyerualjetwork/visualizations_cuda.py,sha256=PYRqj4QYUbuYMYcNwO8yaTPB-jK7E6kZHhTrAi0lwPU,28749
|
21
|
-
pyerualjetwork-4.3.
|
22
|
-
pyerualjetwork-4.3.
|
23
|
-
pyerualjetwork-4.3.
|
24
|
-
pyerualjetwork-4.3.
|
21
|
+
pyerualjetwork-4.3.9b2.dist-info/METADATA,sha256=AQn9V-32uZrqHfQXYB0DBx47o_K5-dBBhGzCKysiKgw,7476
|
22
|
+
pyerualjetwork-4.3.9b2.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
23
|
+
pyerualjetwork-4.3.9b2.dist-info/top_level.txt,sha256=BRyt62U_r3ZmJpj-wXNOoA345Bzamrj6RbaWsyW4tRg,15
|
24
|
+
pyerualjetwork-4.3.9b2.dist-info/RECORD,,
|
File without changes
|
File without changes
|