pyerualjetwork 5.40a5__py3-none-any.whl → 5.41__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.
@@ -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.40a5"
45
+ __version__ = "5.41"
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
@@ -418,20 +418,11 @@ def plot_decision_boundary(x, y, ax, activations, W, artist, model_type, activat
418
418
  feature_indices = [0, 1]
419
419
 
420
420
  template_model = get_model_template()
421
-
422
- template_model = template_model(
423
- W,
424
- None,
425
- None,
426
- activations,
427
- None,
428
- None,
429
- model_type,
430
- None,
431
- None,
432
- None,
433
- None,
434
- activation_potentiation)
421
+
422
+ model = template_model._replace(weights=W,
423
+ activations=activations,
424
+ model_type=model_type,
425
+ activation_potentiation=activation_potentiation)
435
426
  h = .02
436
427
  array_type = np if not cuda else cp
437
428
  x_min, x_max = x[:, feature_indices[0]].min() - 1, x[:, feature_indices[0]].max() + 1
@@ -443,7 +434,7 @@ def plot_decision_boundary(x, y, ax, activations, W, artist, model_type, activat
443
434
  grid_full = array_type.zeros((grid.shape[0], x.shape[1]), dtype=array_type.float32)
444
435
  grid_full[:, feature_indices] = grid
445
436
 
446
- Z = array_type.argmax(predict_from_memory(grid_full, model=template_model, cuda=cuda), axis=1)
437
+ Z = array_type.argmax(predict_from_memory(grid_full, model=model, cuda=cuda), axis=1)
447
438
 
448
439
  Z = Z.reshape(xx.shape)
449
440
 
@@ -9,7 +9,7 @@ ensuring users are not affected by such problems. PyereualJetwork aims to offer
9
9
 
10
10
  Module functions:
11
11
  -----------------
12
- - update_model_to_v5()
12
+ - update_model_to_v5_4()
13
13
 
14
14
  Examples: https://github.com/HCB06/PyerualJetwork/tree/main/Welcome_to_PyerualJetwork/ExampleCodes
15
15
 
@@ -61,7 +61,9 @@ def get_model_template():
61
61
  "activation_potentiation"
62
62
  ])
63
63
 
64
- return Model
64
+ template_model = Model(None, None, None, None, None, None, None, None, None, None, None, None)
65
+
66
+ return template_model
65
67
 
66
68
 
67
69
  def save_model(model,
pyerualjetwork/nn.py CHANGED
@@ -451,20 +451,14 @@ def learn(x_train, y_train, optimizer, template_model, gen, pop_size, fit_start=
451
451
 
452
452
  display_visualizations_for_learner(viz_objects, best_weight, data, best_acc,
453
453
  best_loss, y_train, interval)
454
- model = template_model(
455
- best_weight,
456
- best_model[get_preds()],
457
- best_acc,
458
- final_activations,
459
- None,
460
- best_model[get_preds_softmax()],
461
- model_type,
462
- None,
463
- None,
464
- None,
465
- None,
466
- activation_potentiation
467
- )
454
+
455
+ model = template_model._replace(weights=best_weight,
456
+ predictions=best_model[get_preds()],
457
+ accuracy=best_acc,
458
+ activations=final_activations,
459
+ softmax_predictions=best_model[get_preds_softmax()],
460
+ model_type=model_type,
461
+ activation_potentiation=activation_potentiation)
468
462
 
469
463
  return model
470
464
 
@@ -492,20 +486,14 @@ def learn(x_train, y_train, optimizer, template_model, gen, pop_size, fit_start=
492
486
  # Display final visualizations
493
487
  display_visualizations_for_learner(viz_objects, best_weight, data, best_acc,
494
488
  train_loss, y_train, interval)
495
- model = template_model(
496
- best_weight,
497
- best_model[get_preds()],
498
- best_acc,
499
- final_activations,
500
- None,
501
- best_model[get_preds_softmax()],
502
- model_type,
503
- None,
504
- None,
505
- None,
506
- None,
507
- activation_potentiation
508
- )
489
+
490
+ model = template_model._replace(weights=best_weight,
491
+ predictions=best_model[get_preds()],
492
+ accuracy=best_acc,
493
+ activations=final_activations,
494
+ softmax_predictions=best_model[get_preds_softmax()],
495
+ model_type=model_type,
496
+ activation_potentiation=activation_potentiation)
509
497
 
510
498
  return model
511
499
 
@@ -570,20 +558,14 @@ def learn(x_train, y_train, optimizer, template_model, gen, pop_size, fit_start=
570
558
  # Display final visualizations
571
559
  display_visualizations_for_learner(viz_objects, best_weight, data, best_acc,
572
560
  train_loss, y_train, interval)
573
- model = template_model(
574
- best_weight,
575
- best_model[get_preds()],
576
- best_acc,
577
- final_activations,
578
- None,
579
- best_model[get_preds_softmax()],
580
- model_type,
581
- None,
582
- None,
583
- None,
584
- None,
585
- activation_potentiation
586
- )
561
+
562
+ model = template_model._replace(weights=best_weight,
563
+ predictions=best_model[get_preds()],
564
+ accuracy=best_acc,
565
+ activations=final_activations,
566
+ softmax_predictions=best_model[get_preds_softmax()],
567
+ model_type=model_type,
568
+ activation_potentiation=activation_potentiation)
587
569
 
588
570
  return model
589
571
 
@@ -612,20 +594,13 @@ def learn(x_train, y_train, optimizer, template_model, gen, pop_size, fit_start=
612
594
  # Display final visualizations
613
595
  display_visualizations_for_learner(viz_objects, best_weight, data, best_acc, train_loss, y_train, interval)
614
596
 
615
- model = template_model(
616
- best_weight,
617
- best_model[get_preds()],
618
- best_acc,
619
- final_activations,
620
- None,
621
- best_model[get_preds_softmax()],
622
- model_type,
623
- None,
624
- None,
625
- None,
626
- None,
627
- activation_potentiation
628
- )
597
+ model = template_model._replace(weights=best_weight,
598
+ predictions=best_model[get_preds()],
599
+ accuracy=best_acc,
600
+ activations=final_activations,
601
+ softmax_predictions=best_model[get_preds_softmax()],
602
+ model_type=model_type,
603
+ activation_potentiation=activation_potentiation)
629
604
 
630
605
  return model
631
606
 
@@ -667,7 +642,7 @@ def evaluate(
667
642
  cuda (bool, optional): CUDA GPU acceleration ? Default = False.
668
643
 
669
644
  Returns:
670
- tuple: Model (list).
645
+ tuple: W, preds, accuracy, None, None, softmax_preds
671
646
  """
672
647
 
673
648
  from .cpu.visualizations import plot_evaluate
@@ -692,19 +667,11 @@ def evaluate(
692
667
  if model is None:
693
668
  from .model_ops import get_model_template
694
669
  template_model = get_model_template()
695
- model = template_model(
696
- W,
697
- None,
698
- None,
699
- activations,
700
- None,
701
- None,
702
- model_type,
703
- None,
704
- None,
705
- None,
706
- None,
707
- activation_potentiations)
670
+
671
+ model = template_model._replace(weights=W,
672
+ activations=activations,
673
+ model_type=model_type,
674
+ activation_potentiation=activation_potentiations)
708
675
 
709
676
  result = predict_from_memory(x_test, model, cuda=cuda)
710
677
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyerualjetwork
3
- Version: 5.40a5
3
+ Version: 5.41
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,11 +1,11 @@
1
- pyerualjetwork/__init__.py,sha256=PuoImPRAjBnly-WAXknkCpwtVZnvlskun0ddRvygd-g,3022
1
+ pyerualjetwork/__init__.py,sha256=M8wDX2Ze7U05lRLij7xi-8GisOWef9QjxYOfKQwsIOg,3020
2
2
  pyerualjetwork/ene.py,sha256=8g2XEPRm3NLqSaN7xihIj1xXdIjSrl8Q69zqWTIXPI4,42142
3
3
  pyerualjetwork/fitness_functions.py,sha256=D9JVCr9DFid_xXgBD4uCKxdW2k10MVDE5HZRSOK4Igg,1237
4
4
  pyerualjetwork/help.py,sha256=sn9jBzXkQsTZvdgsUXUpSs_BbYYIgY3whofg6dj8peI,848
5
- pyerualjetwork/issue_solver.py,sha256=W7DIetvWD535bjJ4JueTUmWRFceqr5B_U1tFjv0S7f0,4100
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=sGPvgWFwLI5dVV4cRVqeA7Zc0NTiz8F-3v55UbiV9_k,22547
8
- pyerualjetwork/nn.py,sha256=RclJ8-XYRppjnB-mQiC1O_2auUeVkUYZE5ec5dTc7Z4,36280
7
+ pyerualjetwork/model_ops.py,sha256=cvbESE77oYJKCObejNQDfHokJix6M-UP0zY-_3M4-jM,22658
8
+ pyerualjetwork/nn.py,sha256=68by_dONoNWcD2KXiDOMIDAkQbISoT6w2IdhgdWf1QM,36654
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
11
11
  pyerualjetwork/ui.py,sha256=JBTFYz5R24XwNKhA3GSW-oYAoiIBxAE3kFGXkvm5gqw,656
@@ -14,14 +14,14 @@ pyerualjetwork/cpu/activation_functions.py,sha256=zZSoOQ452Ykp_RsHVxklxesJmmFguf
14
14
  pyerualjetwork/cpu/data_ops.py,sha256=SPsIcjU0JPHfsnEmGjD8q-yTlpgYk-KPOPJ44dfp-nU,16143
15
15
  pyerualjetwork/cpu/loss_functions.py,sha256=6PyBI232SQRGuFnG3LDGvnv_PUdWzT2_2mUODJiejGI,618
16
16
  pyerualjetwork/cpu/metrics.py,sha256=NF8FARAqtuGlf4omVkQT4pOQZy7uePqzuHZGX9Y_Pn4,6076
17
- pyerualjetwork/cpu/visualizations.py,sha256=vFuyidhZb26xnABXTrotpcNzQo9HpHRpAlMlk_uYpec,27146
17
+ pyerualjetwork/cpu/visualizations.py,sha256=fzpzRDuAVKAoT4fQuxAYGQe-0kd7XvhGUjs8-m6J3lI,26946
18
18
  pyerualjetwork/cuda/__init__.py,sha256=Kja6OmNaJ0giOhRNYw9hgGkh5N4F1EUS2v94E_rmp2k,839
19
19
  pyerualjetwork/cuda/activation_functions.py,sha256=Gj-qalU0GoAWoZzbFFHsD-R0c0KzHwOK1wwUQneBE44,6872
20
20
  pyerualjetwork/cuda/data_ops.py,sha256=k7NX-ckZ6-NwvioigACUHrekG7L5lO4bzTtQbBwH1Fc,18508
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.40a5.dist-info/METADATA,sha256=NvDdk3EyFhaLEfG7LiGPVsBInKDEkYzBq2i6DKkX1Jg,7990
25
- pyerualjetwork-5.40a5.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
26
- pyerualjetwork-5.40a5.dist-info/top_level.txt,sha256=BRyt62U_r3ZmJpj-wXNOoA345Bzamrj6RbaWsyW4tRg,15
27
- pyerualjetwork-5.40a5.dist-info/RECORD,,
24
+ pyerualjetwork-5.41.dist-info/METADATA,sha256=6HzgbuoZo3MHbGblwnKpIBVmaB7LgXrf_d3Ako-stWs,7988
25
+ pyerualjetwork-5.41.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
26
+ pyerualjetwork-5.41.dist-info/top_level.txt,sha256=BRyt62U_r3ZmJpj-wXNOoA345Bzamrj6RbaWsyW4tRg,15
27
+ pyerualjetwork-5.41.dist-info/RECORD,,