pyerualjetwork 4.3.8.dev7__tar.gz → 4.3.8.dev9__tar.gz

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.
Files changed (48) hide show
  1. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/PKG-INFO +1 -1
  2. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork/__init__.py +1 -1
  3. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork.egg-info/PKG-INFO +1 -1
  4. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork_afterburner/__init__.py +1 -1
  5. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork_afterburner/planeat_cuda.py +78 -60
  6. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/setup.py +1 -1
  7. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/README.md +0 -0
  8. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork/activation_functions.py +0 -0
  9. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork/activation_functions_cuda.py +0 -0
  10. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork/data_operations.py +0 -0
  11. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork/data_operations_cuda.py +0 -0
  12. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork/help.py +0 -0
  13. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork/loss_functions.py +0 -0
  14. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork/loss_functions_cuda.py +0 -0
  15. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork/memory_operations.py +0 -0
  16. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork/metrics.py +0 -0
  17. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork/metrics_cuda.py +0 -0
  18. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork/model_operations.py +0 -0
  19. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork/model_operations_cuda.py +0 -0
  20. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork/plan.py +0 -0
  21. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork/plan_cuda.py +0 -0
  22. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork/planeat.py +0 -0
  23. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork/planeat_cuda.py +0 -0
  24. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork/ui.py +0 -0
  25. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork/visualizations.py +0 -0
  26. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork/visualizations_cuda.py +0 -0
  27. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork.egg-info/SOURCES.txt +0 -0
  28. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork.egg-info/dependency_links.txt +0 -0
  29. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork.egg-info/top_level.txt +0 -0
  30. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork_afterburner/activation_functions.py +0 -0
  31. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork_afterburner/activation_functions_cuda.py +0 -0
  32. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork_afterburner/data_operations.py +0 -0
  33. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork_afterburner/data_operations_cuda.py +0 -0
  34. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork_afterburner/help.py +0 -0
  35. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork_afterburner/loss_functions.py +0 -0
  36. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork_afterburner/loss_functions_cuda.py +0 -0
  37. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork_afterburner/memory_operations.py +0 -0
  38. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork_afterburner/metrics.py +0 -0
  39. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork_afterburner/metrics_cuda.py +0 -0
  40. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork_afterburner/model_operations.py +0 -0
  41. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork_afterburner/model_operations_cuda.py +0 -0
  42. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork_afterburner/plan.py +0 -0
  43. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork_afterburner/plan_cuda.py +0 -0
  44. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork_afterburner/planeat.py +0 -0
  45. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork_afterburner/ui.py +0 -0
  46. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork_afterburner/visualizations.py +0 -0
  47. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/pyerualjetwork_afterburner/visualizations_cuda.py +0 -0
  48. {pyerualjetwork-4.3.8.dev7 → pyerualjetwork-4.3.8.dev9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyerualjetwork
3
- Version: 4.3.8.dev7
3
+ Version: 4.3.8.dev9
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
- __version__ = "4.3.8dev7"
1
+ __version__ = "4.3.8dev9"
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.dev7
3
+ Version: 4.3.8.dev9
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
- __version__ = "4.3.8dev7-afterburner"
1
+ __version__ = "4.3.8dev9-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__):
@@ -299,30 +299,36 @@ def evolver(weights,
299
299
  mutated_act = bad_activations.copy()
300
300
 
301
301
  if __name__ == '__main__':
302
+ process_func = partial(process_single, policy=policy, best_weight=best_weight,
303
+ best_activations=best_activations, good_weights=good_weights,
304
+ good_activations=good_activations, bad_weights=bad_weights,
305
+ bad_activations=bad_activations, best_fitness=best_fitness,
306
+ normalized_fitness=normalized_fitness, child_W=child_W,
307
+ child_act=child_act, mutated_W=mutated_W, mutated_act=mutated_act,
308
+ cross_over_mode=cross_over_mode,
309
+ activation_selection_add_prob=activation_selection_add_prob,
310
+ activation_selection_change_prob=activation_selection_change_prob,
311
+ activation_selection_threshold=activation_selection_threshold,
312
+ bad_genomes_selection_prob=bad_genomes_selection_prob,
313
+ fitness_bias=fitness_bias,
314
+ epsilon=epsilon,
315
+ bad_genomes_mutation_prob=bad_genomes_mutation_prob,
316
+ activation_mutate_prob=activation_mutate_prob,
317
+ activation_mutate_add_prob=activation_mutate_add_prob,
318
+ activation_mutate_delete_prob=activation_mutate_delete_prob,
319
+ activation_mutate_change_prob=activation_mutate_change_prob,
320
+ weight_mutate_prob=weight_mutate_prob,
321
+ weight_mutate_threshold=weight_mutate_threshold,
322
+ activation_mutate_threshold=activation_mutate_threshold)
323
+
302
324
  with mp.Pool() as pool:
303
- process_func = partial(process_single, policy=policy, best_weight=best_weight,
304
- best_activations=best_activations, good_weights=good_weights,
305
- good_activations=good_activations, bad_weights=bad_weights,
306
- bad_activations=bad_activations, best_fitness=best_fitness,
307
- normalized_fitness=normalized_fitness, child_W=child_W,
308
- child_act=child_act, mutated_W=mutated_W, mutated_act=mutated_act,
309
- cross_over_mode=cross_over_mode,
310
- activation_selection_add_prob=activation_selection_add_prob,
311
- activation_selection_change_prob=activation_selection_change_prob,
312
- activation_selection_threshold=activation_selection_threshold,
313
- bad_genomes_selection_prob=bad_genomes_selection_prob,
314
- fitness_bias=fitness_bias,
315
- epsilon=epsilon,
316
- bad_genomes_mutation_prob=bad_genomes_mutation_prob,
317
- activation_mutate_prob=activation_mutate_prob,
318
- activation_mutate_add_prob=activation_mutate_add_prob,
319
- activation_mutate_delete_prob=activation_mutate_delete_prob,
320
- activation_mutate_change_prob=activation_mutate_change_prob,
321
- weight_mutate_prob=weight_mutate_prob,
322
- weight_mutate_threshold=weight_mutate_threshold,
323
- activation_mutate_threshold=activation_mutate_threshold)
324
-
325
- pool.map(process_func, range(len(bad_weights)))
325
+ results = pool.map(process_func, range(len(bad_weights)))
326
+
327
+ for i, new_child_W, new_child_act, new_mutated_W, new_mutated_act in results:
328
+ child_W[i] = new_child_W
329
+ child_act[i] = new_child_act
330
+ mutated_W[i] = new_mutated_W
331
+ mutated_act[i] = new_mutated_act
326
332
 
327
333
  child_W[0] = best_weight
328
334
  child_act[0] = best_activations
@@ -367,39 +373,47 @@ def evolver(weights,
367
373
  return weights, activation_potentiations
368
374
 
369
375
 
370
- def process_single(i, policy, best_weight, best_activations, good_weights, good_activations,
371
- bad_weights, bad_activations, best_fitness, normalized_fitness, child_W, child_act,
372
- mutated_W, mutated_act, cross_over_mode,
373
- activation_selection_add_prob, activation_selection_change_prob,
374
- activation_selection_threshold, bad_genomes_selection_prob, fitness_bias,
375
- epsilon, bad_genomes_mutation_prob, activation_mutate_prob,
376
- activation_mutate_add_prob, activation_mutate_delete_prob,
377
- activation_mutate_change_prob, weight_mutate_prob, weight_mutate_threshold,
378
- activation_mutate_threshold):
376
+ def process_single(i, policy, best_weight, best_activations,
377
+ good_weights, good_activations,
378
+ bad_weights, bad_activations,
379
+ best_fitness, normalized_fitness,
380
+ cross_over_mode,
381
+ activation_selection_add_prob, activation_selection_change_prob,
382
+ activation_selection_threshold,
383
+ bad_genomes_selection_prob, fitness_bias,
384
+ epsilon, bad_genomes_mutation_prob,
385
+ activation_mutate_prob, activation_mutate_add_prob,
386
+ activation_mutate_delete_prob, activation_mutate_change_prob,
387
+ weight_mutate_prob, weight_mutate_threshold,
388
+ activation_mutate_threshold):
389
+
379
390
  if policy == 'aggressive':
380
391
  first_parent_W = best_weight
381
392
  first_parent_act = best_activations
382
393
  elif policy == 'explorer':
383
394
  first_parent_W = good_weights[i]
384
395
  first_parent_act = good_activations[i]
385
- else:
396
+ else:
386
397
  raise ValueError("policy parameter must be: 'aggressive' or 'explorer'")
387
398
 
388
- second_parent_W, second_parent_act, s_i = second_parent_selection(good_weights, bad_weights, good_activations, bad_activations, bad_genomes_selection_prob)
389
- child_W[i], child_act[i] = cross_over(first_parent_W,
390
- second_parent_W,
391
- first_parent_act,
392
- second_parent_act,
393
- cross_over_mode=cross_over_mode,
394
- activation_selection_add_prob=activation_selection_add_prob,
395
- activation_selection_change_prob=activation_selection_change_prob,
396
- activation_selection_threshold=activation_selection_threshold,
397
- bad_genomes_selection_prob=bad_genomes_selection_prob,
398
- first_parent_fitness=best_fitness,
399
- fitness_bias=fitness_bias,
400
- second_parent_fitness=normalized_fitness[s_i],
401
- epsilon=epsilon
402
- )
399
+ second_parent_W, second_parent_act, s_i = second_parent_selection(
400
+ good_weights, bad_weights, good_activations, bad_activations, bad_genomes_selection_prob)
401
+
402
+ new_child_W, new_child_act = cross_over(
403
+ first_parent_W,
404
+ second_parent_W,
405
+ first_parent_act,
406
+ second_parent_act,
407
+ cross_over_mode=cross_over_mode,
408
+ activation_selection_add_prob=activation_selection_add_prob,
409
+ activation_selection_change_prob=activation_selection_change_prob,
410
+ activation_selection_threshold=activation_selection_threshold,
411
+ bad_genomes_selection_prob=bad_genomes_selection_prob,
412
+ first_parent_fitness=best_fitness,
413
+ fitness_bias=fitness_bias,
414
+ second_parent_fitness=normalized_fitness[s_i],
415
+ epsilon=epsilon
416
+ )
403
417
 
404
418
  mutation_prob = random.uniform(0, 1)
405
419
  if mutation_prob > bad_genomes_mutation_prob:
@@ -411,18 +425,22 @@ def process_single(i, policy, best_weight, best_activations, good_weights, good_
411
425
  genome_act = bad_activations[i]
412
426
  fitness_index = i
413
427
 
414
- mutated_W[i], mutated_act[i] = mutation(genome_W,
415
- genome_act,
416
- activation_mutate_prob=activation_mutate_prob,
417
- activation_add_prob=activation_mutate_add_prob,
418
- activation_delete_prob=activation_mutate_delete_prob,
419
- activation_change_prob=activation_mutate_change_prob,
420
- weight_mutate_prob=weight_mutate_prob,
421
- weight_mutate_threshold=weight_mutate_threshold,
422
- genome_fitness=normalized_fitness[fitness_index],
423
- activation_mutate_threshold=activation_mutate_threshold,
424
- epsilon=epsilon
425
- )
428
+ new_mutated_W, new_mutated_act = mutation(
429
+ genome_W,
430
+ genome_act,
431
+ activation_mutate_prob=activation_mutate_prob,
432
+ activation_add_prob=activation_mutate_add_prob,
433
+ activation_delete_prob=activation_mutate_delete_prob,
434
+ activation_change_prob=activation_mutate_change_prob,
435
+ weight_mutate_prob=weight_mutate_prob,
436
+ weight_mutate_threshold=weight_mutate_threshold,
437
+ genome_fitness=normalized_fitness[fitness_index],
438
+ activation_mutate_threshold=activation_mutate_threshold,
439
+ epsilon=epsilon
440
+ )
441
+
442
+ return (i, new_child_W, new_child_act, new_mutated_W, new_mutated_act)
443
+
426
444
 
427
445
  def evaluate(x_population, weights, activation_potentiations):
428
446
  """
@@ -6,7 +6,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
6
6
  # Setting Up
7
7
  setup(
8
8
  name="pyerualjetwork",
9
- version="4.3.8dev7",
9
+ version="4.3.8dev9",
10
10
  author="Hasan Can Beydili",
11
11
  author_email="tchasancan@gmail.com",
12
12
  description=(