pyerualjetwork 5.46__tar.gz → 5.47b0__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 (31) hide show
  1. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/PKG-INFO +1 -1
  2. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork/__init__.py +1 -1
  3. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork/cpu/visualizations.py +1 -3
  4. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork/nn.py +10 -5
  5. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork.egg-info/PKG-INFO +1 -1
  6. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/setup.py +1 -1
  7. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/README.md +0 -0
  8. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork/cpu/__init__.py +0 -0
  9. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork/cpu/activation_functions.py +0 -0
  10. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork/cpu/data_ops.py +0 -0
  11. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork/cpu/loss_functions.py +0 -0
  12. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork/cpu/metrics.py +0 -0
  13. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork/cuda/__init__.py +0 -0
  14. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork/cuda/activation_functions.py +0 -0
  15. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork/cuda/data_ops.py +0 -0
  16. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork/cuda/loss_functions.py +0 -0
  17. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork/cuda/metrics.py +0 -0
  18. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork/cuda/visualizations.py +0 -0
  19. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork/ene.py +0 -0
  20. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork/fitness_functions.py +0 -0
  21. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork/help.py +0 -0
  22. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork/issue_solver.py +0 -0
  23. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork/memory_ops.py +0 -0
  24. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork/model_ops.py +0 -0
  25. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork/old_cpu_model_ops.py +0 -0
  26. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork/old_cuda_model_ops.py +0 -0
  27. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork/ui.py +0 -0
  28. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork.egg-info/SOURCES.txt +0 -0
  29. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork.egg-info/dependency_links.txt +0 -0
  30. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/pyerualjetwork.egg-info/top_level.txt +0 -0
  31. {pyerualjetwork-5.46 → pyerualjetwork-5.47b0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyerualjetwork
3
- Version: 5.46
3
+ Version: 5.47b0
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
@@ -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.46"
45
+ __version__ = "5.47b0"
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
@@ -275,7 +275,7 @@ def draw_activations(x_train, activation):
275
275
  return x_train
276
276
 
277
277
 
278
- def plot_evaluate(x_test, y_test, y_preds, model, cuda=False):
278
+ def plot_evaluate(x_test, y_test, y_preds, model, acc, cuda=False):
279
279
 
280
280
  if not cuda:
281
281
  from .metrics import metrics, confusion_matrix, roc_curve
@@ -287,8 +287,6 @@ def plot_evaluate(x_test, y_test, y_preds, model, cuda=False):
287
287
 
288
288
  from ..model_ops import predict_from_memory
289
289
 
290
- acc = model.accuracy
291
-
292
290
  y_true = decode_one_hot(y_test)
293
291
  y_preds = decode_one_hot(y_preds)
294
292
 
@@ -314,12 +314,17 @@ def learn(x_train, y_train, optimizer, template_model, gen, pop_size, fit_start=
314
314
  # TRANSFORMATION PLAN TO MLP FOR PTNN (in later generations)
315
315
  if model_type == 'PLAN' and transfer_learning:
316
316
  if i == gen_copy[0]:
317
+
318
+ if cuda:
319
+ array_type = cp
320
+ else:
321
+ array_type = np
317
322
 
318
323
  model_type = 'PTNN'
319
324
  neurons = neurons_copy
320
325
 
321
326
  for individual in range(len(weight_pop)):
322
- weight_pop[individual] = np.copy(best_weight)
327
+ weight_pop[individual] = array_type.copy(best_weight)
323
328
  activation_potentiations[individual] = final_activations.copy() if isinstance(final_activations, list) else final_activations
324
329
 
325
330
  activation_potentiation = activation_potentiations[0]
@@ -333,13 +338,13 @@ def learn(x_train, y_train, optimizer, template_model, gen, pop_size, fit_start=
333
338
  for l in range(1, len(weight_pop[0])):
334
339
  original_shape = weight_pop[0][l].shape
335
340
 
336
- identity_matrix = np.eye(original_shape[0], original_shape[1], dtype=weight_pop[0][l].dtype)
341
+ identity_matrix = array_type.eye(original_shape[0], original_shape[1], dtype=weight_pop[0][l].dtype)
337
342
  weight_pop[0][l] = identity_matrix
338
343
 
339
344
  for l in range(len(weight_pop)):
340
- weight_pop[l][0] = np.copy(best_weight)
345
+ weight_pop[l][0] = array_type.copy(best_weight)
341
346
 
342
- best_weight = np.array(weight_pop[0], dtype=object)
347
+ best_weight = array_type.array(weight_pop[0], dtype=object)
343
348
  final_activations = act_pop[0]
344
349
  is_mlp = True
345
350
  fit_start = False
@@ -684,6 +689,6 @@ def evaluate(
684
689
  softmax_preds = array_type.exp(result - max_vals) / array_type.sum(array_type.exp(result - max_vals), axis=1, keepdims=True)
685
690
  accuracy = (array_type.argmax(softmax_preds, axis=1) == array_type.argmax(y_test, axis=1)).mean()
686
691
 
687
- if show_report: plot_evaluate(x_test, y_test, result, model=model, cuda=cuda)
692
+ if show_report: plot_evaluate(x_test, y_test, result, acc=accuracy, model=model, cuda=cuda)
688
693
 
689
694
  return W, result, accuracy, None, None, softmax_preds
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyerualjetwork
3
- Version: 5.46
3
+ Version: 5.47b0
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
@@ -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="5.46",
9
+ version="5.47b0",
10
10
  author="Hasan Can Beydili",
11
11
  author_email="tchasancan@gmail.com",
12
12
  description=(
File without changes
File without changes