pyerualjetwork 4.2.0b4__py3-none-any.whl → 4.2.0b6__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/planeat.py +8 -11
- pyerualjetwork/planeat_cuda.py +10 -13
- {pyerualjetwork-4.2.0b4.dist-info → pyerualjetwork-4.2.0b6.dist-info}/METADATA +1 -1
- {pyerualjetwork-4.2.0b4.dist-info → pyerualjetwork-4.2.0b6.dist-info}/RECORD +7 -7
- {pyerualjetwork-4.2.0b4.dist-info → pyerualjetwork-4.2.0b6.dist-info}/WHEEL +0 -0
- {pyerualjetwork-4.2.0b4.dist-info → pyerualjetwork-4.2.0b6.dist-info}/top_level.txt +0 -0
pyerualjetwork/__init__.py
CHANGED
@@ -48,7 +48,7 @@ for package_name in package_names:
|
|
48
48
|
|
49
49
|
print(f"PyerualJetwork is ready to use with {err} errors")
|
50
50
|
|
51
|
-
__version__ = "4.2.
|
51
|
+
__version__ = "4.2.0b6"
|
52
52
|
__update__ = "* Changes: https://github.com/HCB06/PyerualJetwork/blob/main/CHANGES\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"
|
53
53
|
|
54
54
|
def print_version(__version__):
|
pyerualjetwork/planeat.py
CHANGED
@@ -76,7 +76,7 @@ def evolver(weights,
|
|
76
76
|
what_gen,
|
77
77
|
fitness,
|
78
78
|
show_info=False,
|
79
|
-
policy='
|
79
|
+
policy='aggressive',
|
80
80
|
bad_genomes_selection_prob=None,
|
81
81
|
bar_status=True,
|
82
82
|
strategy='normal_selective',
|
@@ -128,7 +128,7 @@ def evolver(weights,
|
|
128
128
|
|
129
129
|
policy (str, optional): The selection policy that governs how genomes are selected for reproduction. Options:
|
130
130
|
|
131
|
-
- '
|
131
|
+
- 'aggressive': Aggressive policy using very aggressive selection policy.
|
132
132
|
Advantages: fast training.
|
133
133
|
Disadvantages: may lead to fitness stuck in a local maximum or minimum.
|
134
134
|
|
@@ -138,7 +138,7 @@ def evolver(weights,
|
|
138
138
|
|
139
139
|
Suggestions: Use hybrid and dynamic policy. When fitness appears stuck, switch to the 'explorer' policy.
|
140
140
|
|
141
|
-
Default: '
|
141
|
+
Default: 'aggressive'.
|
142
142
|
|
143
143
|
target_fitness (str, optional): Target fitness strategy for PLANEAT optimization. ('max' maximizes fitness, 'min' minimizes fitness.) Default: 'max'.
|
144
144
|
|
@@ -307,12 +307,9 @@ def evolver(weights,
|
|
307
307
|
best_fitness = normalized_fitness[-1]
|
308
308
|
epsilon = np.finfo(float).eps
|
309
309
|
|
310
|
-
child_W = np.empty(bad_weights[0].shape, dtype=dtype)
|
311
|
-
child_act = bad_activations.copy()
|
312
|
-
|
313
310
|
for i in range(len(bad_weights)):
|
314
311
|
|
315
|
-
if policy == '
|
312
|
+
if policy == 'aggressive':
|
316
313
|
first_parent_W = best_weight
|
317
314
|
first_parent_act = best_activations
|
318
315
|
|
@@ -320,11 +317,11 @@ def evolver(weights,
|
|
320
317
|
first_parent_W = good_weights[i]
|
321
318
|
first_parent_act = good_activations[i]
|
322
319
|
|
323
|
-
else: raise ValueError("policy parameter must be: '
|
320
|
+
else: raise ValueError("policy parameter must be: 'aggressive' or 'explorer'")
|
324
321
|
|
325
322
|
second_parent_W, second_parent_act, s_i = second_parent_selection(good_weights, bad_weights, good_activations, bad_activations, bad_genomes_selection_prob)
|
326
323
|
|
327
|
-
|
324
|
+
bad_weights[i], bad_activations[i] = cross_over(first_parent_W,
|
328
325
|
second_parent_W,
|
329
326
|
first_parent_act,
|
330
327
|
second_parent_act,
|
@@ -373,8 +370,8 @@ def evolver(weights,
|
|
373
370
|
|
374
371
|
if bar_status: progress.update(1)
|
375
372
|
|
376
|
-
weights = np.vstack((
|
377
|
-
activation_potentiations =
|
373
|
+
weights = np.vstack((bad_weights, good_weights))
|
374
|
+
activation_potentiations = bad_activations + good_activations
|
378
375
|
|
379
376
|
### INFO PRINTING CONSOLE
|
380
377
|
|
pyerualjetwork/planeat_cuda.py
CHANGED
@@ -78,7 +78,7 @@ def evolver(weights,
|
|
78
78
|
what_gen,
|
79
79
|
fitness,
|
80
80
|
show_info=False,
|
81
|
-
policy='
|
81
|
+
policy='aggressive',
|
82
82
|
bad_genomes_selection_prob=None,
|
83
83
|
bar_status=True,
|
84
84
|
strategy='normal_selective',
|
@@ -130,7 +130,7 @@ def evolver(weights,
|
|
130
130
|
|
131
131
|
policy (str, optional): The selection policy that governs how genomes are selected for reproduction. Options:
|
132
132
|
|
133
|
-
- '
|
133
|
+
- 'aggressive': Aggressive policy using very aggressive selection policy.
|
134
134
|
Advantages: fast training.
|
135
135
|
Disadvantages: may lead to fitness stuck in a local maximum or minimum.
|
136
136
|
|
@@ -140,7 +140,7 @@ def evolver(weights,
|
|
140
140
|
|
141
141
|
Suggestions: Use hybrid and dynamic policy. When fitness appears stuck, switch to the 'explorer' policy.
|
142
142
|
|
143
|
-
Default: '
|
143
|
+
Default: 'aggressive'.
|
144
144
|
|
145
145
|
target_fitness (str, optional): Target fitness strategy for PLANEAT optimization. ('max' maximizes fitness, 'min' minimizes fitness.) Default: 'max'.
|
146
146
|
|
@@ -192,7 +192,7 @@ def evolver(weights,
|
|
192
192
|
|
193
193
|
Raises:
|
194
194
|
ValueError:
|
195
|
-
- If `policy` is not one of the specified values ('
|
195
|
+
- If `policy` is not one of the specified values ('aggressive', 'explorer').
|
196
196
|
- If 'strategy' is not one of the specified values ('less_selective', 'normal_selective', 'more_selective')
|
197
197
|
- If `cross_over_mode` is not one of the specified values ('tpm').
|
198
198
|
- If `bad_genomes_mutation_prob`, `activation_mutate_prob`, or other probability parameters are not in the range 0 and 1.
|
@@ -224,7 +224,7 @@ def evolver(weights,
|
|
224
224
|
|
225
225
|
Example:
|
226
226
|
```python
|
227
|
-
weights, activation_potentiations = planeat.evolver(weights, activation_potentiations, 1, fitness, show_info=True, strategy='normal_selective', policy='
|
227
|
+
weights, activation_potentiations = planeat.evolver(weights, activation_potentiations, 1, fitness, show_info=True, strategy='normal_selective', policy='aggressive')
|
228
228
|
```
|
229
229
|
|
230
230
|
- The function returns the updated weights and activations after processing based on the chosen strategy, policy, and mutation parameters.
|
@@ -306,13 +306,10 @@ def evolver(weights,
|
|
306
306
|
|
307
307
|
best_fitness = normalized_fitness[-1]
|
308
308
|
epsilon = cp.finfo(float).eps
|
309
|
-
|
310
|
-
child_W = cp.empty(bad_weights[0].shape, dtype=dtype)
|
311
|
-
child_act = bad_activations.copy()
|
312
309
|
|
313
310
|
for i in range(len(bad_weights)):
|
314
311
|
|
315
|
-
if policy == '
|
312
|
+
if policy == 'aggressive':
|
316
313
|
first_parent_W = best_weight
|
317
314
|
first_parent_act = best_activations
|
318
315
|
|
@@ -320,11 +317,11 @@ def evolver(weights,
|
|
320
317
|
first_parent_W = good_weights[i]
|
321
318
|
first_parent_act = good_activations[i]
|
322
319
|
|
323
|
-
else: raise ValueError("policy parameter must be: '
|
320
|
+
else: raise ValueError("policy parameter must be: 'aggressive' or 'explorer'")
|
324
321
|
|
325
322
|
second_parent_W, second_parent_act, s_i = second_parent_selection(good_weights, bad_weights, good_activations, bad_activations, bad_genomes_selection_prob)
|
326
323
|
|
327
|
-
|
324
|
+
bad_weights[i], bad_activations[i] = cross_over(first_parent_W,
|
328
325
|
second_parent_W,
|
329
326
|
first_parent_act,
|
330
327
|
second_parent_act,
|
@@ -373,8 +370,8 @@ def evolver(weights,
|
|
373
370
|
|
374
371
|
if bar_status: progress.update(1)
|
375
372
|
|
376
|
-
weights = cp.vstack((
|
377
|
-
activation_potentiations =
|
373
|
+
weights = cp.vstack((bad_weights, good_weights))
|
374
|
+
activation_potentiations = bad_activations + good_activations
|
378
375
|
|
379
376
|
### INFO PRINTING CONSOLE
|
380
377
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pyerualjetwork
|
3
|
-
Version: 4.2.
|
3
|
+
Version: 4.2.0b6
|
4
4
|
Summary: PyerualJetwork is a machine learning library written in Python for professionals, incorporating advanced, unique, new, and modern techniques.
|
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=Kw8tdzAvdhcMyujbsOF0VTVKE5wB-uqKBZ4AH8iNlcQ,2177
|
2
2
|
pyerualjetwork/activation_functions.py,sha256=WWOdMd5pI6ZKe-ieKCIsKAYPQODHuXYxx7tzhA5xjes,11767
|
3
3
|
pyerualjetwork/activation_functions_cuda.py,sha256=KmXJ5Cdig46XAMYakXFPEOlxSxtFJjD21-i3nGtxPjE,11807
|
4
4
|
pyerualjetwork/data_operations.py,sha256=HjyW2QE18age6J8iG0jpbwqGOylL_nM-vE2CLbP9Wes,14690
|
@@ -13,12 +13,12 @@ pyerualjetwork/model_operations.py,sha256=hnhR8dtoICNJWIwGgJ65-LN3GYN_DYH4LMe6Yp
|
|
13
13
|
pyerualjetwork/model_operations_cuda.py,sha256=XnKKq54ZLaqCm-NaJ6d8IToACKcKg2Ttq6moowVRRWo,13365
|
14
14
|
pyerualjetwork/plan.py,sha256=EobwajGSIgbOujkzDKb-Kea0LGRHqpK3Xy1Le8VBAe8,34422
|
15
15
|
pyerualjetwork/plan_cuda.py,sha256=iCcAHLzVw_VyjhkFHXzBWiedwbnpI1MCXNJgSDgZxWw,36065
|
16
|
-
pyerualjetwork/planeat.py,sha256=
|
17
|
-
pyerualjetwork/planeat_cuda.py,sha256=
|
16
|
+
pyerualjetwork/planeat.py,sha256=EtmOUCRmkXGuSj35fU5Y-gvBsRodVlMsEgvbrXIzY2A,40997
|
17
|
+
pyerualjetwork/planeat_cuda.py,sha256=XkFbQF7pmPRWCQTacbmIab8yWkq-6S3dM-N1ehxzSvk,40963
|
18
18
|
pyerualjetwork/ui.py,sha256=wu2BhU1k-w3Kcho5Jtq4SEKe68ftaUeRGneUOSCVDjU,575
|
19
19
|
pyerualjetwork/visualizations.py,sha256=QaYSIyVkJZ8NqpBKArQKkI1y37nCQo_KIM98IMssnRc,28766
|
20
20
|
pyerualjetwork/visualizations_cuda.py,sha256=F60vQ92AXlMgBka3InXnOtGoM25vQJAlBIU2AlYTwks,29200
|
21
|
-
pyerualjetwork-4.2.
|
22
|
-
pyerualjetwork-4.2.
|
23
|
-
pyerualjetwork-4.2.
|
24
|
-
pyerualjetwork-4.2.
|
21
|
+
pyerualjetwork-4.2.0b6.dist-info/METADATA,sha256=-m0uyY5sgobRog9idkhbeSHS5l9h_qDoKywhbG2sAes,7795
|
22
|
+
pyerualjetwork-4.2.0b6.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
23
|
+
pyerualjetwork-4.2.0b6.dist-info/top_level.txt,sha256=BRyt62U_r3ZmJpj-wXNOoA345Bzamrj6RbaWsyW4tRg,15
|
24
|
+
pyerualjetwork-4.2.0b6.dist-info/RECORD,,
|
File without changes
|
File without changes
|