pyerualjetwork 4.3.8.dev11__py3-none-any.whl → 4.3.8.dev12__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.8.dev11.dist-info → pyerualjetwork-4.3.8.dev12.dist-info}/METADATA +1 -1
- {pyerualjetwork-4.3.8.dev11.dist-info → pyerualjetwork-4.3.8.dev12.dist-info}/RECORD +8 -8
- pyerualjetwork_afterburner/__init__.py +1 -1
- pyerualjetwork_afterburner/plan_cuda.py +2 -1
- pyerualjetwork_afterburner/planeat_cuda.py +70 -71
- {pyerualjetwork-4.3.8.dev11.dist-info → pyerualjetwork-4.3.8.dev12.dist-info}/WHEEL +0 -0
- {pyerualjetwork-4.3.8.dev11.dist-info → pyerualjetwork-4.3.8.dev12.dist-info}/top_level.txt +0 -0
pyerualjetwork/__init__.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
__version__ = "4.3.
|
1
|
+
__version__ = "4.3.8dev12"
|
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.8.
|
3
|
+
Version: 4.3.8.dev12
|
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=mYHgj6_HSs1hKuwJhvsdityKzWx1stIRLwsak7O-JNA,644
|
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=XQXi0SD3pbpG0OYlaQqCfi2_x69zIzX4a9smtT5oMS0,656
|
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=EOXngujG7DQRf3cooFigKB7heQsEoK96JtrcKivT_pE,22449
|
35
|
-
pyerualjetwork_afterburner/plan_cuda.py,sha256=
|
35
|
+
pyerualjetwork_afterburner/plan_cuda.py,sha256=ujswqGVrJK5q6IpU3gGpzoz1bzE4rFadSE6grLZ6KaI,23420
|
36
36
|
pyerualjetwork_afterburner/planeat.py,sha256=Lq5R0aMS4UIdZdbUKsKDv5g0WLwYryomR3IQYb8vAa4,37573
|
37
|
-
pyerualjetwork_afterburner/planeat_cuda.py,sha256=
|
37
|
+
pyerualjetwork_afterburner/planeat_cuda.py,sha256=Xt8ZdZqIMNcizFrRqjvoORmcHxI97f18EHqWOpivdwc,39276
|
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.8.
|
42
|
-
pyerualjetwork-4.3.8.
|
43
|
-
pyerualjetwork-4.3.8.
|
44
|
-
pyerualjetwork-4.3.8.
|
41
|
+
pyerualjetwork-4.3.8.dev12.dist-info/METADATA,sha256=RWTkv7XSYmemQDOY60v1GsOom9lF7WTftbupvkL2U3o,8385
|
42
|
+
pyerualjetwork-4.3.8.dev12.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
43
|
+
pyerualjetwork-4.3.8.dev12.dist-info/top_level.txt,sha256=uK64ge08QQoPuXM3aiRVPgiQQtl8Fxm2-HieIut5Lwo,42
|
44
|
+
pyerualjetwork-4.3.8.dev12.dist-info/RECORD,,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
__version__ = "4.3.
|
1
|
+
__version__ = "4.3.8dev12-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__):
|
@@ -368,7 +368,8 @@ def learner(x_train, y_train, optimizer, fit_start, strategy='accuracy', gen=Non
|
|
368
368
|
best_acc_per_gen_list.append(best_acc)
|
369
369
|
loss_list.append(best_loss)
|
370
370
|
|
371
|
-
|
371
|
+
if __name__ == '__main__':
|
372
|
+
weight_pop, act_pop = optimizer(cp.array(weight_pop, copy=False, dtype=dtype), act_pop, i, cp.array(target_pop, dtype=dtype, copy=False), bar_status=False)
|
372
373
|
target_pop = []
|
373
374
|
|
374
375
|
# Early stopping check
|
@@ -295,77 +295,76 @@ def evolver(weights,
|
|
295
295
|
mutated_W = cp.copy(bad_weights)
|
296
296
|
mutated_act = bad_activations.copy()
|
297
297
|
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
298
|
+
process_func = partial(process_single, policy=policy, best_weight=best_weight,
|
299
|
+
best_activations=best_activations, good_weights=good_weights,
|
300
|
+
good_activations=good_activations, bad_weights=bad_weights,
|
301
|
+
bad_activations=bad_activations, best_fitness=best_fitness,
|
302
|
+
normalized_fitness=normalized_fitness, child_W=child_W,
|
303
|
+
child_act=child_act, mutated_W=mutated_W, mutated_act=mutated_act,
|
304
|
+
cross_over_mode=cross_over_mode,
|
305
|
+
activation_selection_add_prob=activation_selection_add_prob,
|
306
|
+
activation_selection_change_prob=activation_selection_change_prob,
|
307
|
+
activation_selection_threshold=activation_selection_threshold,
|
308
|
+
bad_genomes_selection_prob=bad_genomes_selection_prob,
|
309
|
+
fitness_bias=fitness_bias,
|
310
|
+
epsilon=epsilon,
|
311
|
+
bad_genomes_mutation_prob=bad_genomes_mutation_prob,
|
312
|
+
activation_mutate_prob=activation_mutate_prob,
|
313
|
+
activation_mutate_add_prob=activation_mutate_add_prob,
|
314
|
+
activation_mutate_delete_prob=activation_mutate_delete_prob,
|
315
|
+
activation_mutate_change_prob=activation_mutate_change_prob,
|
316
|
+
weight_mutate_prob=weight_mutate_prob,
|
317
|
+
weight_mutate_threshold=weight_mutate_threshold,
|
318
|
+
activation_mutate_threshold=activation_mutate_threshold)
|
319
|
+
|
320
|
+
with mp.Pool() as pool:
|
321
|
+
results = pool.map(process_func, range(len(bad_weights)))
|
322
|
+
|
323
|
+
for i, new_child_W, new_child_act, new_mutated_W, new_mutated_act in results:
|
324
|
+
child_W[i] = new_child_W
|
325
|
+
child_act[i] = new_child_act
|
326
|
+
mutated_W[i] = new_mutated_W
|
327
|
+
mutated_act[i] = new_mutated_act
|
328
|
+
|
329
|
+
child_W[0] = best_weight
|
330
|
+
child_act[0] = best_activations
|
331
|
+
|
332
|
+
weights = cp.vstack((child_W, mutated_W))
|
333
|
+
activation_potentiations = child_act + mutated_act
|
334
|
+
|
335
|
+
### INFO PRINTING CONSOLE
|
336
|
+
|
337
|
+
if show_info == True:
|
338
|
+
print("\nGENERATION:", str(what_gen) + ' FINISHED \n')
|
339
|
+
print("*** Configuration Settings ***")
|
340
|
+
print(" POPULATION SIZE: ", str(len(weights)))
|
341
|
+
print(" STRATEGY: ", strategy)
|
342
|
+
print(" CROSS OVER MODE: ", cross_over_mode)
|
343
|
+
print(" POLICY: ", policy)
|
344
|
+
print(" BAD GENOMES MUTATION PROB: ", str(bad_genomes_mutation_prob))
|
345
|
+
print(" GOOD GENOMES MUTATION PROB: ", str(round(1 - bad_genomes_mutation_prob, 2)))
|
346
|
+
print(" BAD GENOMES SELECTION PROB: ", str(bad_genomes_selection_prob))
|
347
|
+
print(" WEIGHT MUTATE PROB: ", str(weight_mutate_prob))
|
348
|
+
print(" WEIGHT MUTATE THRESHOLD: ", str(weight_mutate_threshold))
|
349
|
+
print(" ACTIVATION MUTATE PROB: ", str(activation_mutate_prob))
|
350
|
+
print(" ACTIVATION MUTATE THRESHOLD: ", str(activation_mutate_threshold))
|
351
|
+
print(" ACTIVATION MUTATE ADD PROB: ", str(activation_mutate_add_prob))
|
352
|
+
print(" ACTIVATION MUTATE DELETE PROB: ", str(activation_mutate_delete_prob))
|
353
|
+
print(" ACTIVATION MUTATE CHANGE PROB: ", str(activation_mutate_change_prob))
|
354
|
+
print(" ACTIVATION SELECTION THRESHOLD:", str(activation_selection_threshold))
|
355
|
+
print(" ACTIVATION SELECTION ADD PROB: ", str(activation_selection_add_prob))
|
356
|
+
print(" ACTIVATION SELECTION CHANGE PROB: ", str(activation_selection_change_prob))
|
357
|
+
print(" FITNESS BIAS: ", str(fitness_bias) + '\n')
|
358
|
+
|
359
|
+
print("*** Performance ***")
|
360
|
+
print(" MAX FITNESS: ", str(cp.round(max(fitness), 2)))
|
361
|
+
print(" MEAN FITNESS: ", str(cp.round(cp.mean(fitness), 2)))
|
362
|
+
print(" MIN FITNESS: ", str(cp.round(min(fitness), 2)) + '\n')
|
363
|
+
|
364
|
+
print(" BEST GENOME ACTIVATION LENGTH: ", str(len(best_activations)))
|
365
|
+
print(" BEST GENOME INDEX: ", str(0))
|
366
|
+
print(" NOTE: The returned genome at the first index is the best of the previous generation." + '\n')
|
367
|
+
|
369
368
|
|
370
369
|
return weights, activation_potentiations
|
371
370
|
|
File without changes
|
File without changes
|