pyerualjetwork 5.48__py3-none-any.whl → 5.49__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/ene.py +4 -4
- pyerualjetwork/model_ops.py +13 -10
- {pyerualjetwork-5.48.dist-info → pyerualjetwork-5.49.dist-info}/METADATA +1 -1
- {pyerualjetwork-5.48.dist-info → pyerualjetwork-5.49.dist-info}/RECORD +7 -7
- {pyerualjetwork-5.48.dist-info → pyerualjetwork-5.49.dist-info}/WHEEL +0 -0
- {pyerualjetwork-5.48.dist-info → pyerualjetwork-5.49.dist-info}/top_level.txt +0 -0
pyerualjetwork/__init__.py
CHANGED
@@ -42,7 +42,7 @@ PyerualJetwork document: https://github.com/HCB06/PyerualJetwork/blob/main/Welco
|
|
42
42
|
- Contact: tchasancan@gmail.com
|
43
43
|
"""
|
44
44
|
|
45
|
-
__version__ = "5.
|
45
|
+
__version__ = "5.49"
|
46
46
|
__update__ = """* Changes: https://github.com/HCB06/PyerualJetwork/blob/main/CHANGES
|
47
47
|
* PyerualJetwork Homepage: https://github.com/HCB06/PyerualJetwork/tree/main
|
48
48
|
* PyerualJetwork document: https://github.com/HCB06/PyerualJetwork/blob/main/Welcome_to_PyerualJetwork/PYERUALJETWORK_USER_MANUEL_AND_LEGAL_INFORMATION(EN).pdf
|
pyerualjetwork/ene.py
CHANGED
@@ -122,7 +122,7 @@ def evolver(weights,
|
|
122
122
|
policy='aggressive',
|
123
123
|
bad_genomes_selection_prob=None,
|
124
124
|
bar_status=True,
|
125
|
-
strategy='
|
125
|
+
strategy='more_selective',
|
126
126
|
bad_genomes_mutation_prob=None,
|
127
127
|
fitness_bias=1,
|
128
128
|
cross_over_mode='tpm',
|
@@ -137,7 +137,7 @@ def evolver(weights,
|
|
137
137
|
weight_mutate_threshold=16,
|
138
138
|
weight_mutate_prob=1,
|
139
139
|
is_mlp=False,
|
140
|
-
save_best_genome=
|
140
|
+
save_best_genome=True,
|
141
141
|
dtype=np.float32):
|
142
142
|
"""
|
143
143
|
Applies the evolving process of a population of genomes using selection, crossover, mutation, and activation function potentiation.
|
@@ -167,7 +167,7 @@ def evolver(weights,
|
|
167
167
|
- 'normal_selective': Normal selection based on fitness, where a portion of the bad genes are discarded.
|
168
168
|
- 'more_selective': A more selective strategy, where fewer bad genes survive.
|
169
169
|
- 'less_selective': A less selective strategy, where more bad genes survive.
|
170
|
-
Default is '
|
170
|
+
Default is 'more_selective'.
|
171
171
|
|
172
172
|
bar_status (bool, optional): Loading bar status during evolving process of genomes. True or False. Default: True
|
173
173
|
|
@@ -226,7 +226,7 @@ def evolver(weights,
|
|
226
226
|
|
227
227
|
is_mlp (bool, optional): Evolve PLAN model or MLP model ? Default: False (PLAN)
|
228
228
|
|
229
|
-
save_best_genome (bool, optional): Save the best genome of the previous generation to the next generation. (index of best individual: 0) Default:
|
229
|
+
save_best_genome (bool, optional): Save the best genome of the previous generation to the next generation. (index of best individual: 0) Default: True
|
230
230
|
|
231
231
|
dtype (numpy.dtype, optional): Data type for the arrays. Default: np.float32.
|
232
232
|
Example: np.float64 or np.float16 [fp32 for balanced devices, fp64 for strong devices, fp16 for weak devices: not recommended!].
|
pyerualjetwork/model_ops.py
CHANGED
@@ -499,11 +499,14 @@ def predict_from_storage(Input, model_name, cuda=False, model_path=''):
|
|
499
499
|
activations = [item if isinstance(item, list) or isinstance(item, str) else [item] for item in activations]
|
500
500
|
|
501
501
|
if model_type == 'MLP':
|
502
|
+
|
502
503
|
layer = Input
|
503
504
|
for i in range(len(W)):
|
504
|
-
if i
|
505
|
-
|
506
|
-
|
505
|
+
if i == 0:
|
506
|
+
layer = layer @ cp.array(W[i]).T if cuda else layer @ W[i].T
|
507
|
+
else:
|
508
|
+
layer = apply_activation(layer, activations[i])
|
509
|
+
layer = layer @ cp.array(W[i]).T if cuda else layer @ W[i].T
|
507
510
|
|
508
511
|
result = layer
|
509
512
|
|
@@ -523,8 +526,7 @@ def predict_from_storage(Input, model_name, cuda=False, model_path=''):
|
|
523
526
|
layer = Input @ cp.array(W[0]).T if cuda else Input @ W[0].T
|
524
527
|
|
525
528
|
for i in range(1, len(W)):
|
526
|
-
|
527
|
-
|
529
|
+
layer = apply_activation(layer, activations[i])
|
528
530
|
layer = layer @ cp.array(W[i]).T if cuda else layer @ W[i].T
|
529
531
|
|
530
532
|
result = layer
|
@@ -617,9 +619,11 @@ def predict_from_memory(Input, model, cuda=False):
|
|
617
619
|
if model_type == 'MLP':
|
618
620
|
layer = Input
|
619
621
|
for i in range(len(W)):
|
620
|
-
if i
|
621
|
-
|
622
|
-
|
622
|
+
if i == 0:
|
623
|
+
layer = layer @ cp.array(W[i]).T if cuda else layer @ W[i].T
|
624
|
+
else:
|
625
|
+
layer = apply_activation(layer, activations[i])
|
626
|
+
layer = layer @ cp.array(W[i]).T if cuda else layer @ W[i].T
|
623
627
|
|
624
628
|
result = layer
|
625
629
|
|
@@ -639,8 +643,7 @@ def predict_from_memory(Input, model, cuda=False):
|
|
639
643
|
layer = Input @ cp.array(W[0]).T if cuda else Input @ W[0].T
|
640
644
|
|
641
645
|
for i in range(1, len(W)):
|
642
|
-
|
643
|
-
|
646
|
+
layer = apply_activation(layer, activations[i])
|
644
647
|
layer = layer @ cp.array(W[i]).T if cuda else layer @ W[i].T
|
645
648
|
|
646
649
|
result = layer
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pyerualjetwork
|
3
|
-
Version: 5.
|
3
|
+
Version: 5.49
|
4
4
|
Summary: PyereualJetwork is a GPU-accelerated machine learning library in Python for professionals and researchers. It features PLAN, MLP, Deep Learning training, and ENE (Eugenic NeuroEvolution) for genetic optimization, applicable to genetic algorithms or Reinforcement Learning (RL). The library includes data pre-processing, visualizations, model saving/loading, prediction, evaluation, training, and detailed or simplified memory management.
|
5
5
|
Author: Hasan Can Beydili
|
6
6
|
Author-email: tchasancan@gmail.com
|
@@ -1,10 +1,10 @@
|
|
1
|
-
pyerualjetwork/__init__.py,sha256=
|
2
|
-
pyerualjetwork/ene.py,sha256=
|
1
|
+
pyerualjetwork/__init__.py,sha256=mFxYGSQWvUNRiGLa2dCpWcHMskjuUbPZcpgjMKxMq4A,3020
|
2
|
+
pyerualjetwork/ene.py,sha256=luTvspHRTose6s3uRas40pNXyKoxU9siaHiMBNI5yoc,42136
|
3
3
|
pyerualjetwork/fitness_functions.py,sha256=D9JVCr9DFid_xXgBD4uCKxdW2k10MVDE5HZRSOK4Igg,1237
|
4
4
|
pyerualjetwork/help.py,sha256=sn9jBzXkQsTZvdgsUXUpSs_BbYYIgY3whofg6dj8peI,848
|
5
5
|
pyerualjetwork/issue_solver.py,sha256=uay_9XK6xWnLmK2P_BeyDQlyNXzg_zYffnXYd228wZk,4102
|
6
6
|
pyerualjetwork/memory_ops.py,sha256=TUFh9SYWCKL6N-vNdWId_EwU313TuZomQCHOrltrD-4,14280
|
7
|
-
pyerualjetwork/model_ops.py,sha256=
|
7
|
+
pyerualjetwork/model_ops.py,sha256=reky09eiECdhuiaWQwz4iMtIxPxKHBNPETGYlNGe2U8,25287
|
8
8
|
pyerualjetwork/nn.py,sha256=t1Jf99F6PqfEfCH6erPcwN6q-tF3DPYgHUlQ7OMtnv8,36656
|
9
9
|
pyerualjetwork/old_cpu_model_ops.py,sha256=1KNgjUeYCO_TsA5RtbNiuIiBJzq8-rL2dE6jxKqCBU0,21481
|
10
10
|
pyerualjetwork/old_cuda_model_ops.py,sha256=KAscAd8e_I8Vqdd9BJaHd6-IG6fhxFglAFxys0sqmEo,23079
|
@@ -21,7 +21,7 @@ pyerualjetwork/cuda/data_ops.py,sha256=BEXh4M7BWXaTpYlVS9D2i3CGgOmL5131vy7FZyuTQ
|
|
21
21
|
pyerualjetwork/cuda/loss_functions.py,sha256=C93IZJcrOpT6HMK9x1O4AHJWXYTkN5WZiqdssPbvAPk,617
|
22
22
|
pyerualjetwork/cuda/metrics.py,sha256=PjDBoRvr6va8vRvDIJJGBO4-I4uumrk3NCM1Vz4NJTo,5054
|
23
23
|
pyerualjetwork/cuda/visualizations.py,sha256=2mHE7iqqsN3K6xtCnemS4o_YWGS0bIV2IxF4cG6Ur9k,20090
|
24
|
-
pyerualjetwork-5.
|
25
|
-
pyerualjetwork-5.
|
26
|
-
pyerualjetwork-5.
|
27
|
-
pyerualjetwork-5.
|
24
|
+
pyerualjetwork-5.49.dist-info/METADATA,sha256=j27spk_SvvDITw89XDgCCPX3oc5SWyaGhDXdMJ4IsNA,7988
|
25
|
+
pyerualjetwork-5.49.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
26
|
+
pyerualjetwork-5.49.dist-info/top_level.txt,sha256=BRyt62U_r3ZmJpj-wXNOoA345Bzamrj6RbaWsyW4tRg,15
|
27
|
+
pyerualjetwork-5.49.dist-info/RECORD,,
|
File without changes
|
File without changes
|