pyerualjetwork 5.33b1__py3-none-any.whl → 5.35__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.33b1"
45
+ __version__ = "5.35"
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/cpu/ene.py CHANGED
@@ -227,7 +227,7 @@ def evolver(weights,
227
227
 
228
228
  is_mlp (bool, optional): Evolve PLAN model or MLP model ? Default: False (PLAN)
229
229
 
230
- save_best_genome (bool, optional): Save the best genome of the previous generation to the next generation. Default: False
230
+ save_best_genome (bool, optional): Save the best genome of the previous generation to the next generation. (index of best individual: 0) Default: False
231
231
 
232
232
  dtype (numpy.dtype, optional): Data type for the arrays. Default: np.float32.
233
233
  Example: np.float64 or np.float16 [fp32 for balanced devices, fp64 for strong devices, fp16 for weak devices: not recommended!].
pyerualjetwork/cpu/nn.py CHANGED
@@ -277,7 +277,7 @@ def learn(x_train, y_train, optimizer, gen, pop_size, fit_start=True, batch_size
277
277
  # LEARNING STARTED
278
278
  for i in range(gen):
279
279
 
280
- # TRANSFORMATION PLAN TO MLP FOR PTNN (in later generations)
280
+ # TRANSFORMATION PLAN TO MLP FOR PTNN (in later generations)
281
281
  if model_type == 'PLAN' and transfer_learning:
282
282
  if i == gen_copy[0]:
283
283
 
@@ -295,14 +295,15 @@ def learn(x_train, y_train, optimizer, gen, pop_size, fit_start=True, batch_size
295
295
 
296
296
  weight_pop, act_pop = define_genomes(input_shape=len(x_train[0]), output_shape=len(y_train[0]), neurons=neurons_copy, activation_functions=activation_functions, population_size=pop_size, dtype=dtype)
297
297
 
298
- # 0 indexed individual will keep PLAN's learned informations and in later generations it will share with other individuals.
299
- for layer in range(1, len(mlp_W)):
300
- row_shape, col_shape = mlp_W[layer].shape
298
+ # 0 indexed individual will keep PLAN's learned informations and in later generations it will share other individuals.
299
+ for l in range(1, len(weight_pop[0])):
300
+ original_shape = weight_pop[0][l].shape
301
301
 
302
- identity_matrix = np.eye(row_shape, col_shape)
303
- mlp_W[layer] = identity_matrix
304
-
305
- mlp_W[0] = plan_W
302
+ identity_matrix = np.eye(original_shape[0], original_shape[1], dtype=weight_pop[0][l].dtype)
303
+ weight_pop[0][l] = identity_matrix
304
+
305
+ for l in range(len(weight_pop)):
306
+ weight_pop[l][0] = np.copy(best_weight)
306
307
 
307
308
  best_weight = np.array(weight_pop[0], dtype=object)
308
309
  final_activations = act_pop[0]
@@ -414,7 +415,7 @@ def learn(x_train, y_train, optimizer, gen, pop_size, fit_start=True, batch_size
414
415
 
415
416
  display_visualizations_for_learner(viz_objects, best_weight, data, best_acc,
416
417
  best_loss, y_train, interval)
417
- return best_weight, best_model[get_preds_softmax()], best_acc, final_activations, None, None, None, None, None, None, None, activation_potentiation
418
+ return best_weight, best_model[get_preds_softmax()], best_acc, final_activations, None, None, model_type, None, None, None, None, activation_potentiation
418
419
 
419
420
  # Check target loss
420
421
  if target_loss is not None and best_loss <= target_loss:
@@ -438,7 +439,7 @@ def learn(x_train, y_train, optimizer, gen, pop_size, fit_start=True, batch_size
438
439
  # Display final visualizations
439
440
  display_visualizations_for_learner(viz_objects, best_weight, data, best_acc,
440
441
  train_loss, y_train, interval)
441
- return best_weight, best_model[get_preds_softmax()], best_acc, final_activations, None, None, None, None, None, None, None, activation_potentiation
442
+ return best_weight, best_model[get_preds_softmax()], best_acc, final_activations, None, None, model_type, None, None, None, None, activation_potentiation
442
443
 
443
444
 
444
445
  progress.update(1)
@@ -493,7 +494,7 @@ def learn(x_train, y_train, optimizer, gen, pop_size, fit_start=True, batch_size
493
494
  # Display final visualizations
494
495
  display_visualizations_for_learner(viz_objects, best_weight, data, best_acc,
495
496
  train_loss, y_train, interval)
496
- return best_weight, best_model[get_preds_softmax()], best_acc, final_activations, None, None, None, None, None, None, None, activation_potentiation
497
+ return best_weight, best_model[get_preds_softmax()], best_acc, final_activations, None, None, model_type, None, None, None, None, activation_potentiation
497
498
 
498
499
  # Final evaluation
499
500
  progress.close()
@@ -516,7 +517,7 @@ def learn(x_train, y_train, optimizer, gen, pop_size, fit_start=True, batch_size
516
517
 
517
518
  # Display final visualizations
518
519
  display_visualizations_for_learner(viz_objects, best_weight, data, best_acc, train_loss, y_train, interval)
519
- return best_weight, best_model[get_preds_softmax()], best_acc, final_activations, None, None, None, None, None, None, None, activation_potentiation
520
+ return best_weight, best_model[get_preds_softmax()], best_acc, final_activations, None, None, model_type, None, None, None, None, activation_potentiation
520
521
 
521
522
 
522
523
  def evaluate(
@@ -227,7 +227,7 @@ def evolver(weights,
227
227
 
228
228
  is_mlp (bool, optional): Evolve PLAN model or MLP model ? Default: False (PLAN)
229
229
 
230
- save_best_genome (bool, optional): Save the best genome of the previous generation to the next generation. Default: False
230
+ save_best_genome (bool, optional): Save the best genome of the previous generation to the next generation. (index of best individual: 0) Default: False
231
231
 
232
232
  dtype (cupy.dtype): Data type for the arrays. Default: cp.float32.
233
233
  Example: cp.float64 or cp.float16 [fp32 for balanced devices, fp64 for strong devices, fp16 for weak devices: not recommended!].
pyerualjetwork/cuda/nn.py CHANGED
@@ -425,7 +425,7 @@ def learn(x_train, y_train, optimizer, gen, pop_size, fit_start=True, batch_size
425
425
 
426
426
  display_visualizations_for_learner(viz_objects, best_weight, data, best_acc,
427
427
  best_loss, y_train, interval)
428
- return best_weight, best_model[get_preds_softmax()], best_acc, final_activations, None, None, None, None, None, None, None, activation_potentiation
428
+ return best_weight, best_model[get_preds_softmax()], best_acc, final_activations, None, None, model_type, None, None, None, None, activation_potentiation
429
429
 
430
430
  # Check target loss
431
431
  if target_loss is not None and best_loss <= target_loss:
@@ -449,7 +449,7 @@ def learn(x_train, y_train, optimizer, gen, pop_size, fit_start=True, batch_size
449
449
  # Display final visualizations
450
450
  display_visualizations_for_learner(viz_objects, best_weight, data, best_acc,
451
451
  train_loss, y_train, interval)
452
- return best_weight, best_model[get_preds_softmax()], best_acc, final_activations, None, None, None, None, None, None, None, activation_potentiation, None, None, None, None, None, None, None, activation_potentiation
452
+ return best_weight, best_model[get_preds_softmax()], best_acc, final_activations, None, None, model_type, None, None, None, None, activation_potentiation, None, None, None, None, None, None, None, activation_potentiation
453
453
 
454
454
 
455
455
  progress.update(1)
@@ -504,7 +504,7 @@ def learn(x_train, y_train, optimizer, gen, pop_size, fit_start=True, batch_size
504
504
  # Display final visualizations
505
505
  display_visualizations_for_learner(viz_objects, best_weight, data, best_acc,
506
506
  train_loss, y_train, interval)
507
- return best_weight, best_model[get_preds_softmax()], best_acc, final_activations, None, None, None, None, None, None, None, activation_potentiation
507
+ return best_weight, best_model[get_preds_softmax()], best_acc, final_activations, None, None, model_type, None, None, None, None, activation_potentiation
508
508
 
509
509
  # Final evaluation
510
510
  progress.close()
@@ -526,7 +526,7 @@ def learn(x_train, y_train, optimizer, gen, pop_size, fit_start=True, batch_size
526
526
 
527
527
  # Display final visualizations
528
528
  display_visualizations_for_learner(viz_objects, best_weight, data, best_acc, train_loss, y_train, interval)
529
- return best_weight, best_model[get_preds_softmax()], best_acc, final_activations, None, None, None, None, None, None, None, activation_potentiation
529
+ return best_weight, best_model[get_preds_softmax()], best_acc, final_activations, None, None, model_type, None, None, None, None, activation_potentiation
530
530
 
531
531
  def evaluate(
532
532
  x_test,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyerualjetwork
3
- Version: 5.33b1
3
+ Version: 5.35
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,4 +1,4 @@
1
- pyerualjetwork/__init__.py,sha256=W4bT3WHBwgE4q1fLmKqar1XKjQwP28HnECwKutVHPt4,2706
1
+ pyerualjetwork/__init__.py,sha256=tzemMNwT26zguana1GNc5FlQlTKpoAjo6nrcXSoSspQ,2704
2
2
  pyerualjetwork/fitness_functions.py,sha256=D9JVCr9DFid_xXgBD4uCKxdW2k10MVDE5HZRSOK4Igg,1237
3
3
  pyerualjetwork/help.py,sha256=Nyi0gHAN9ZnO4wgQLeENt0n7tSCZ3hJmjaJ853eGjCE,831
4
4
  pyerualjetwork/issue_solver.py,sha256=3pZTGotS29sy3pIuGQoJFUePibtSzS-tNoU80T_Usgk,3131
@@ -7,22 +7,22 @@ pyerualjetwork/ui.py,sha256=JBTFYz5R24XwNKhA3GSW-oYAoiIBxAE3kFGXkvm5gqw,656
7
7
  pyerualjetwork/cpu/__init__.py,sha256=0yAYner_-v7SmT3P7JV2itU8xJUQdQpb40dhAMQiZkc,829
8
8
  pyerualjetwork/cpu/activation_functions.py,sha256=zZSoOQ452Ykp_RsHVxklxesJmmFgufyIB4F3WQjudEQ,6689
9
9
  pyerualjetwork/cpu/data_ops.py,sha256=5biKr7pqLbJOayHYgGdQV1K5GqKbcOvrbbuAyByuDC8,16154
10
- pyerualjetwork/cpu/ene.py,sha256=dfIbcwer_iksec_P6Owq2aMYrAT-8WVUGfglkThRnbY,44421
10
+ pyerualjetwork/cpu/ene.py,sha256=7ZPR7NDhuXCFSucH0l-_vUTDILnQOH-Zxv83Yy5gLL8,44451
11
11
  pyerualjetwork/cpu/loss_functions.py,sha256=6PyBI232SQRGuFnG3LDGvnv_PUdWzT2_2mUODJiejGI,618
12
12
  pyerualjetwork/cpu/metrics.py,sha256=WhZ8iEqWehaygPRADUlhA5j_Qv3UwqV_eMxpyRVkeVs,6070
13
13
  pyerualjetwork/cpu/model_ops.py,sha256=sWsP_7Gfa8_DJ2X7AUrOkeXnz2Eej6573grQQ3CooXM,20295
14
- pyerualjetwork/cpu/nn.py,sha256=TYLXmVLbbfFCDFA_cH9TSMxgjauDi6d7xfrPzOx6Xwg,31867
14
+ pyerualjetwork/cpu/nn.py,sha256=AiL1q-pWr-tzTtQlzoKRnqHQVEvgrUPLUl6_RY02T5s,32032
15
15
  pyerualjetwork/cpu/visualizations.py,sha256=rOQsc-W8b71z7ovXSoF49lx4fmpvlaHLsyj9ejWnhnI,28164
16
16
  pyerualjetwork/cuda/__init__.py,sha256=NbqvAS4jlMdoFdXa5_hi5ukXQ5zAZR_5BQ4QAqtiKug,879
17
17
  pyerualjetwork/cuda/activation_functions.py,sha256=FmoSAxDr9SGO4nkE6ZflXK4pmvZ0sL3Epe1Lz-3GOVI,6766
18
18
  pyerualjetwork/cuda/data_ops.py,sha256=SiNodFNmWyTPY_KnKuAi9biPRdpTAYY3XM01bRSUPCs,18510
19
- pyerualjetwork/cuda/ene.py,sha256=G4y32L6Tl3oe3oc5FxhXh1tDwk44xsocJOUMskv3buk,44946
19
+ pyerualjetwork/cuda/ene.py,sha256=dwH5l7CQqj4kUbcj8vC9gIgEdjFfRN-jw-06ABN-TiU,44976
20
20
  pyerualjetwork/cuda/loss_functions.py,sha256=C93IZJcrOpT6HMK9x1O4AHJWXYTkN5WZiqdssPbvAPk,617
21
21
  pyerualjetwork/cuda/metrics.py,sha256=PjDBoRvr6va8vRvDIJJGBO4-I4uumrk3NCM1Vz4NJTo,5054
22
22
  pyerualjetwork/cuda/model_ops.py,sha256=iQPuxmthKxP2GTFLHJppxoU64C6mEpkDW-DsfwFGiuY,21020
23
- pyerualjetwork/cuda/nn.py,sha256=7rbaIEcmssaFgcionWVRmKijlgFyftVjf-MMNaLO_28,33140
23
+ pyerualjetwork/cuda/nn.py,sha256=EDdiWNUdrEHZXQ9K7qM74Q7OpacAgWM5MsQC8YANlY4,33164
24
24
  pyerualjetwork/cuda/visualizations.py,sha256=9l5BhXqXoeopdhLvVGvjH1TKYZb9JdKOsSE2IYD02zs,28569
25
- pyerualjetwork-5.33b1.dist-info/METADATA,sha256=vWuWmj8I7Tq_j77iIDaCCorcXQ_ZZ40BxEBrxO_0m0M,8022
26
- pyerualjetwork-5.33b1.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
27
- pyerualjetwork-5.33b1.dist-info/top_level.txt,sha256=BRyt62U_r3ZmJpj-wXNOoA345Bzamrj6RbaWsyW4tRg,15
28
- pyerualjetwork-5.33b1.dist-info/RECORD,,
25
+ pyerualjetwork-5.35.dist-info/METADATA,sha256=N_4aSa6MZC16yCH49yTSqOfDJUekrZ4etURXIw9v7xA,8020
26
+ pyerualjetwork-5.35.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
27
+ pyerualjetwork-5.35.dist-info/top_level.txt,sha256=BRyt62U_r3ZmJpj-wXNOoA345Bzamrj6RbaWsyW4tRg,15
28
+ pyerualjetwork-5.35.dist-info/RECORD,,