pyerualjetwork 4.3.7.dev1__py3-none-any.whl → 4.3.8.dev3__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-4.3.7.dev1.dist-info → pyerualjetwork-4.3.8.dev3.dist-info}/METADATA +1 -1
- {pyerualjetwork-4.3.7.dev1.dist-info → pyerualjetwork-4.3.8.dev3.dist-info}/RECORD +8 -8
- pyerualjetwork_afterburner/__init__.py +1 -1
- pyerualjetwork_afterburner/plan_cuda.py +17 -12
- pyerualjetwork_afterburner/planeat_cuda.py +2 -1
- {pyerualjetwork-4.3.7.dev1.dist-info → pyerualjetwork-4.3.8.dev3.dist-info}/WHEEL +0 -0
- {pyerualjetwork-4.3.7.dev1.dist-info → pyerualjetwork-4.3.8.dev3.dist-info}/top_level.txt +0 -0
pyerualjetwork/__init__.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
__version__ = "4.3.
|
1
|
+
__version__ = "4.3.8dev3"
|
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__):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pyerualjetwork
|
3
|
-
Version: 4.3.
|
3
|
+
Version: 4.3.8.dev3
|
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=TigQhP6yP1luXiX5fdCVYqBZQTjPRdboBfy_KU5-g_4,643
|
2
2
|
pyerualjetwork/activation_functions.py,sha256=AR91fQV2W2rc-Qb4Yp7b8ucYpGjwyQUewO-M-lyEMs8,7729
|
3
3
|
pyerualjetwork/activation_functions_cuda.py,sha256=ztIw6rMR4t1289_TPIGYwE6qarl_YbSOGj5Ep3rUMqs,11803
|
4
4
|
pyerualjetwork/data_operations.py,sha256=Flteouu6rfSo2uHMqBHuzO02dXmbNa-I5qWmUpGTZ5Y,14760
|
@@ -18,7 +18,7 @@ pyerualjetwork/planeat_cuda.py,sha256=QNHCQLkR0MNFqyN2iHAtC7cbf8qZiD3p_54YH3lnMF
|
|
18
18
|
pyerualjetwork/ui.py,sha256=wu2BhU1k-w3Kcho5Jtq4SEKe68ftaUeRGneUOSCVDjU,575
|
19
19
|
pyerualjetwork/visualizations.py,sha256=VL00sX2DZz83F__PyEJH9s1LizuXpOBzWjnoSjMJIJ0,28770
|
20
20
|
pyerualjetwork/visualizations_cuda.py,sha256=KbMhfsLlxujy_i3QrwCf734Q-k6d7Zn_7CEbm3gzK9w,29186
|
21
|
-
pyerualjetwork_afterburner/__init__.py,sha256=
|
21
|
+
pyerualjetwork_afterburner/__init__.py,sha256=W9d7H3PMu6MRcdGYPHpUa0q9Kx7-ogu5xLq1g928y64,655
|
22
22
|
pyerualjetwork_afterburner/activation_functions.py,sha256=bKf00lsuuLJNO-4vVp4OqBi4zJ-qZ8L3v-vl52notkY,7721
|
23
23
|
pyerualjetwork_afterburner/activation_functions_cuda.py,sha256=5y1Ti3GDfDteQDCUmODwe7tAyDAUlDTKmIikChQ8d6g,7772
|
24
24
|
pyerualjetwork_afterburner/data_operations.py,sha256=Flteouu6rfSo2uHMqBHuzO02dXmbNa-I5qWmUpGTZ5Y,14760
|
@@ -32,13 +32,13 @@ pyerualjetwork_afterburner/metrics_cuda.py,sha256=73h9GC7XwmnFCVzFEEiPQfF8CwHIz2
|
|
32
32
|
pyerualjetwork_afterburner/model_operations.py,sha256=MCSCNYiiICRVZITobtS3ZIWmH5Q9gjyELuH32sAdgg4,12649
|
33
33
|
pyerualjetwork_afterburner/model_operations_cuda.py,sha256=NT01BK5nrDYE7H1x3KnSI8gmx0QTGGB0mP_LqEb1uuU,13157
|
34
34
|
pyerualjetwork_afterburner/plan.py,sha256=Gxv8ii4brTYMzzFZBP-X6kkwc6w6vtTPiMmqVOAqoq8,21972
|
35
|
-
pyerualjetwork_afterburner/plan_cuda.py,sha256=
|
35
|
+
pyerualjetwork_afterburner/plan_cuda.py,sha256=fg5YunEuBE7sK6q9paP_yAGONr9x0e19oF0J0DucejM,23380
|
36
36
|
pyerualjetwork_afterburner/planeat.py,sha256=Lq5R0aMS4UIdZdbUKsKDv5g0WLwYryomR3IQYb8vAa4,37573
|
37
|
-
pyerualjetwork_afterburner/planeat_cuda.py,sha256=
|
37
|
+
pyerualjetwork_afterburner/planeat_cuda.py,sha256=SG7Oq1F2m3lJBbG9cgmu7q_ApmwSn2SvTpcbtEVAoDE,37630
|
38
38
|
pyerualjetwork_afterburner/ui.py,sha256=wu2BhU1k-w3Kcho5Jtq4SEKe68ftaUeRGneUOSCVDjU,575
|
39
39
|
pyerualjetwork_afterburner/visualizations.py,sha256=1SKMZaJ80OD2qHUyMxW1IOv8zwmxzMPxclfbeq1Xr4g,28772
|
40
40
|
pyerualjetwork_afterburner/visualizations_cuda.py,sha256=KbMhfsLlxujy_i3QrwCf734Q-k6d7Zn_7CEbm3gzK9w,29186
|
41
|
-
pyerualjetwork-4.3.
|
42
|
-
pyerualjetwork-4.3.
|
43
|
-
pyerualjetwork-4.3.
|
44
|
-
pyerualjetwork-4.3.
|
41
|
+
pyerualjetwork-4.3.8.dev3.dist-info/METADATA,sha256=VFNiB4kXQ8sU6wa_9uGjkHi_s-b-rzCY_wIJOLbnALM,8384
|
42
|
+
pyerualjetwork-4.3.8.dev3.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
43
|
+
pyerualjetwork-4.3.8.dev3.dist-info/top_level.txt,sha256=uK64ge08QQoPuXM3aiRVPgiQQtl8Fxm2-HieIut5Lwo,42
|
44
|
+
pyerualjetwork-4.3.8.dev3.dist-info/RECORD,,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
__version__ = "4.3.
|
1
|
+
__version__ = "4.3.8dev3-afterburner"
|
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__):
|
@@ -76,7 +76,7 @@ def fit(
|
|
76
76
|
return normalization(LTPW, dtype=dtype)
|
77
77
|
|
78
78
|
|
79
|
-
def learner(x_train, y_train, optimizer, fit_start, strategy='accuracy', gen=None, batch_size=1,
|
79
|
+
def learner(x_train, y_train, optimizer, fit_start, strategy='accuracy', gen=None, batch_size=1, pop_size=None,
|
80
80
|
neural_web_history=False, show_current_activations=False,
|
81
81
|
neurons_history=False, early_stop=False, loss='categorical_crossentropy', show_history=False,
|
82
82
|
interval=33.33, target_acc=None, target_loss=None,
|
@@ -120,6 +120,8 @@ def learner(x_train, y_train, optimizer, fit_start, strategy='accuracy', gen=Non
|
|
120
120
|
|
121
121
|
batch_size (float, optional): Batch size is used in the prediction process to receive train feedback by dividing the train data into chunks and selecting activations based on randomly chosen partitions. This process reduces computational cost and time while still covering the entire test set due to random selection, so it doesn't significantly impact accuracy. For example, a batch size of 0.08 means each train batch represents 8% of the train set. Default is 1. (%100 of train)
|
122
122
|
|
123
|
+
pop_size (int, optional): Population size of each generation. Default: count of activation functions
|
124
|
+
|
123
125
|
early_stop (bool, optional): If True, implements early stopping during training.(If train accuracy not improves in two gen stops learning.) Default is False.
|
124
126
|
|
125
127
|
show_current_activations (bool, optional): Should it display the activations selected according to the current strategies during learning, or not? (True or False) This can be very useful if you want to cancel the learning process and resume from where you left off later. After canceling, you will need to view the live training activations in order to choose the activations to be given to the 'start_this' parameter. Default is False
|
@@ -129,7 +131,7 @@ def learner(x_train, y_train, optimizer, fit_start, strategy='accuracy', gen=Non
|
|
129
131
|
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'.
|
130
132
|
|
131
133
|
interval (int, optional): The interval at which evaluations are conducted during training. (33.33 = 30 FPS, 16.67 = 60 FPS) Default is 100.
|
132
|
-
|
134
|
+
|
133
135
|
target_acc (int, optional): The target accuracy to stop training early when achieved. Default is None.
|
134
136
|
|
135
137
|
target_loss (float, optional): The target loss to stop training early when achieved. Default is None.
|
@@ -155,12 +157,15 @@ def learner(x_train, y_train, optimizer, fit_start, strategy='accuracy', gen=Non
|
|
155
157
|
|
156
158
|
data = 'Train'
|
157
159
|
|
158
|
-
|
159
|
-
|
160
|
+
except_this = ['spiral', 'circular']
|
161
|
+
activation_potentiation = [item for item in all_activations() if item not in except_this]
|
160
162
|
activation_potentiation_len = len(activation_potentiation)
|
161
163
|
|
164
|
+
if pop_size is None: pop_size = activation_potentiation_len
|
162
165
|
y_train = optimize_labels(y_train, cuda=True)
|
163
166
|
|
167
|
+
if pop_size < activation_potentiation_len: raise ValueError(f"pop_size must be higher or equal to {activation_potentiation_len}")
|
168
|
+
|
164
169
|
if memory == 'gpu':
|
165
170
|
x_train = transfer_to_gpu(x_train, dtype=dtype)
|
166
171
|
y_train = transfer_to_gpu(y_train, dtype=y_train.dtype)
|
@@ -201,16 +206,16 @@ def learner(x_train, y_train, optimizer, fit_start, strategy='accuracy', gen=Non
|
|
201
206
|
|
202
207
|
progress = initialize_loading_bar(total=activation_potentiation_len, desc="", ncols=ncols, bar_format=bar_format_learner)
|
203
208
|
|
204
|
-
if fit_start is False:
|
205
|
-
weight_pop, act_pop = define_genomes(input_shape=len(x_train[0]), output_shape=len(y_train[0]), population_size=
|
209
|
+
if fit_start is False or pop_size > activation_potentiation_len:
|
210
|
+
weight_pop, act_pop = define_genomes(input_shape=len(x_train[0]), output_shape=len(y_train[0]), population_size=pop_size, dtype=dtype)
|
206
211
|
|
207
212
|
if start_this_act is not None and start_this_W is not None:
|
208
213
|
weight_pop[0] = start_this_W
|
209
214
|
act_pop[0] = start_this_act
|
210
215
|
|
211
216
|
else:
|
212
|
-
weight_pop = []
|
213
|
-
act_pop = []
|
217
|
+
weight_pop = [0] * pop_size
|
218
|
+
act_pop = [0] * pop_size
|
214
219
|
|
215
220
|
for i in range(gen):
|
216
221
|
postfix_dict["Gen"] = str(i+1) + '/' + str(gen)
|
@@ -220,17 +225,17 @@ def learner(x_train, y_train, optimizer, fit_start, strategy='accuracy', gen=Non
|
|
220
225
|
progress.last_print_n = 0
|
221
226
|
progress.update(0)
|
222
227
|
|
223
|
-
for j in range(
|
228
|
+
for j in range(pop_size):
|
224
229
|
|
225
230
|
x_train_batch, y_train_batch = batcher(x_train, y_train, batch_size=batch_size)
|
226
231
|
|
227
232
|
x_train_batch = cp.array(x_train_batch, dtype=dtype, copy=False)
|
228
233
|
y_train_batch = cp.array(y_train_batch, dtype=dtype, copy=False)
|
229
234
|
|
230
|
-
if fit_start is True and i == 0:
|
231
|
-
act_pop
|
235
|
+
if fit_start is True and i == 0 and j < activation_potentiation_len:
|
236
|
+
act_pop[j] = activation_potentiation[j]
|
232
237
|
W = fit(x_train_batch, y_train_batch, activation_potentiation=act_pop[-1], dtype=dtype)
|
233
|
-
weight_pop
|
238
|
+
weight_pop[j] = W
|
234
239
|
|
235
240
|
model = evaluate(x_train_batch, y_train_batch, W=weight_pop[j], activation_potentiation=act_pop[j])
|
236
241
|
acc = model[get_acc()]
|
@@ -722,7 +722,8 @@ def mutation(weight,
|
|
722
722
|
|
723
723
|
new_threshold = threshold
|
724
724
|
|
725
|
-
|
725
|
+
except_this = ['spiral', 'circular']
|
726
|
+
all_acts = [item for item in all_activations() if item not in except_this] # SPIRAL AND CIRCULAR ACTIVATION DISCARDED
|
726
727
|
|
727
728
|
activation_add_prob = 1 - activation_add_prob
|
728
729
|
activation_delete_prob = 1 - activation_delete_prob
|
File without changes
|
File without changes
|