pyerualjetwork 4.2.2b9__py3-none-any.whl → 4.2.3__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.
@@ -1,4 +1,4 @@
1
- __version__ = "4.2.2b9"
1
+ __version__ = "4.2.3"
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__):
pyerualjetwork/plan.py CHANGED
@@ -584,12 +584,12 @@ def evaluate(
584
584
  if y_test.dtype != np.uint32:
585
585
  y_test = np.array(y_test, copy=False).astype(np.uint32, copy=False)
586
586
 
587
- predict_probabilitys = np.empty((len(x_test), W.shape[0]), dtype=np.float32)
588
- real_classes = np.empty(len(x_test), dtype=np.int32)
589
- predict_classes = np.empty(len(x_test), dtype=np.int32)
587
+ predict_probabilitys = np.empty((len(x_test), W.shape[0]), dtype=dtype)
588
+ real_classes = np.empty(len(x_test), dtype=y_test.dtype)
589
+ predict_classes = np.empty(len(x_test), dtype=y_test.dtype)
590
590
 
591
591
  true_predict = 0
592
- acc_list = np.empty(len(x_test), dtype=np.float32)
592
+ acc_list = np.empty(len(x_test), dtype=dtype)
593
593
 
594
594
  if loading_bar_status:
595
595
  loading_bar = initialize_loading_bar(total=len(x_test), ncols=64, desc='Testing', bar_format=bar_format_normal)
@@ -299,9 +299,9 @@ def learner(x_train, y_train, optimizer, fit_start, strategy='accuracy', gen=Non
299
299
 
300
300
  # Initialize progress bar
301
301
  if batch_size == 1:
302
- ncols = 86
302
+ ncols = 76
303
303
  else:
304
- ncols = 99
304
+ ncols = 89
305
305
 
306
306
  # Initialize variables
307
307
  best_acc = 0
@@ -323,8 +323,8 @@ def learner(x_train, y_train, optimizer, fit_start, strategy='accuracy', gen=Non
323
323
  act_pop[0] = start_this_act
324
324
 
325
325
  else:
326
- weight_pop = [0] * activation_potentiation_len
327
- act_pop = [0] * activation_potentiation_len
326
+ weight_pop = []
327
+ act_pop = []
328
328
 
329
329
  for i in range(gen):
330
330
  postfix_dict["Gen"] = str(i+1) + '/' + str(gen)
@@ -382,9 +382,9 @@ def learner(x_train, y_train, optimizer, fit_start, strategy='accuracy', gen=Non
382
382
  final_activations = [final_activations[0]] if len(set(final_activations)) == 1 else final_activations # removing if all same
383
383
 
384
384
  if batch_size == 1:
385
- postfix_dict[f"{data} Accuracy"] = best_acc
385
+ postfix_dict[f"{data} Accuracy"] = cp.round(best_acc, 3)
386
386
  else:
387
- postfix_dict[f"{data} Batch Accuracy"] = acc
387
+ postfix_dict[f"{data} Batch Accuracy"] = cp.round(best_acc, 3)
388
388
  progress.set_postfix(postfix_dict)
389
389
 
390
390
  if show_current_activations:
@@ -396,10 +396,10 @@ def learner(x_train, y_train, optimizer, fit_start, strategy='accuracy', gen=Non
396
396
  train_loss = binary_crossentropy(y_true_batch=transfer_to_gpu(y_train_batch, dtype=y_train_batch.dtype), y_pred_batch=model[get_preds_softmax()])
397
397
 
398
398
  if batch_size == 1:
399
- postfix_dict[f"{data} Loss"] = train_loss
399
+ postfix_dict[f"{data} Loss"] = cp.round(train_loss, 3)
400
400
  best_loss = train_loss
401
401
  else:
402
- postfix_dict[f"{data} Batch Loss"] = train_loss
402
+ postfix_dict[f"{data} Batch Loss"] = cp.round(train_loss, 3)
403
403
  progress.set_postfix(postfix_dict)
404
404
  best_loss = train_loss
405
405
 
@@ -321,7 +321,7 @@ def draw_activations(x_train, activation):
321
321
 
322
322
  try: return result
323
323
  except:
324
- print('WARNING: error in drawing some activation.')
324
+ print('\rWARNING: error in drawing some activation.', end='')
325
325
  return x_train
326
326
 
327
327
  def plot_evaluate(x_test, y_test, y_preds, acc_list, W, activation_potentiation):
@@ -753,12 +753,12 @@ def update_history_plots_for_learner(viz_objects, depth_list, loss_list, best_ac
753
753
 
754
754
  # Loss plot
755
755
  art1 = hist['ax'][0].plot(depth_list, loss_list, color='r', markersize=6, linewidth=2)
756
- hist['ax'][0].set_title('Test Loss Over Depth')
756
+ hist['ax'][0].set_title('Train Loss Over Gen')
757
757
  hist['artist1'].append(art1)
758
758
 
759
759
  # Accuracy plot
760
760
  art2 = hist['ax'][1].plot(depth_list, best_acc_per_depth_list, color='g', markersize=6, linewidth=2)
761
- hist['ax'][1].set_title('Test Accuracy Over Depth')
761
+ hist['ax'][1].set_title('Train Accuracy Over Gen')
762
762
  hist['artist2'].append(art2)
763
763
 
764
764
  # Activation shape plot
@@ -768,7 +768,7 @@ def update_history_plots_for_learner(viz_objects, depth_list, loss_list, best_ac
768
768
  translated_x_train += draw_activations(x, activation)
769
769
 
770
770
  art3 = hist['ax'][2].plot(x, translated_x_train, color='b', markersize=6, linewidth=2)
771
- hist['ax'][2].set_title('Potentiation Shape Over Depth')
771
+ hist['ax'][2].set_title('Potentiation Shape Over Gen')
772
772
  hist['artist3'].append(art3)
773
773
 
774
774
  def display_visualizations_for_learner(viz_objects, best_weights, data, best_acc, test_loss, y_train, interval):
@@ -1,7 +1,6 @@
1
1
  import networkx as nx
2
2
  import matplotlib.pyplot as plt
3
3
  import cupy as cp
4
- import numpy as np
5
4
  from scipy.spatial import ConvexHull
6
5
  import seaborn as sns
7
6
  from matplotlib.animation import ArtistAnimation
@@ -323,7 +322,7 @@ def draw_activations(x_train, activation):
323
322
 
324
323
  try: return result
325
324
  except:
326
- print('WARNING: error in drawing some activation.')
325
+ print('\rWARNING: error in drawing some activation.', end='')
327
326
  return x_train
328
327
 
329
328
 
@@ -752,7 +751,7 @@ def update_history_plots_for_learner(viz_objects, depth_list, loss_list, best_ac
752
751
 
753
752
  # Loss plot
754
753
  art1 = hist['ax'][0].plot(depth_list, loss_list, color='r', markersize=6, linewidth=2)
755
- hist['ax'][0].set_title('Test Loss Over Depth')
754
+ hist['ax'][0].set_title('Train Loss Over Gen')
756
755
  hist['artist1'].append(art1)
757
756
 
758
757
  # Accuracy plot
@@ -761,7 +760,7 @@ def update_history_plots_for_learner(viz_objects, depth_list, loss_list, best_ac
761
760
  best_acc_per_depth_list[i] = best_acc_per_depth_list[i].get()
762
761
 
763
762
  art2 = hist['ax'][1].plot(depth_list, best_acc_per_depth_list, color='g', markersize=6, linewidth=2)
764
- hist['ax'][1].set_title('Test Accuracy Over Depth')
763
+ hist['ax'][1].set_title('Train Accuracy Over Gen')
765
764
  hist['artist2'].append(art2)
766
765
 
767
766
  # Activation shape plot
@@ -771,7 +770,7 @@ def update_history_plots_for_learner(viz_objects, depth_list, loss_list, best_ac
771
770
  translated_x_train += draw_activations(x, activation)
772
771
 
773
772
  art3 = hist['ax'][2].plot(x.get(), translated_x_train.get(), color='b', markersize=6, linewidth=2)
774
- hist['ax'][2].set_title('Potentiation Shape Over Depth')
773
+ hist['ax'][2].set_title('Potentiation Shape Over Gen')
775
774
  hist['artist3'].append(art3)
776
775
 
777
776
  def display_visualizations_for_learner(viz_objects, best_weights, data, best_acc, test_loss, y_train, interval):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyerualjetwork
3
- Version: 4.2.2b9
3
+ Version: 4.2.3
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=a6UkWE_IQhWoOdKIwrnkz8XpXkvatloaavZmLirZZn4,641
1
+ pyerualjetwork/__init__.py,sha256=WEa6P6TMj_krls2lUT03x8-D9kFttdmY3Ebk0ODmt40,639
2
2
  pyerualjetwork/activation_functions.py,sha256=WWOdMd5pI6ZKe-ieKCIsKAYPQODHuXYxx7tzhA5xjes,11767
3
3
  pyerualjetwork/activation_functions_cuda.py,sha256=KmXJ5Cdig46XAMYakXFPEOlxSxtFJjD21-i3nGtxPjE,11807
4
4
  pyerualjetwork/data_operations.py,sha256=pb5CqJ0Th6fCjTNMCtqQMiwH3KezTxAijacglsKUxmY,14730
@@ -11,14 +11,14 @@ pyerualjetwork/metrics.py,sha256=q7MkhnZDRbCjFBDDfUgrl8lBYnUT_1ro1LxeBq105pI,607
11
11
  pyerualjetwork/metrics_cuda.py,sha256=73h9GC7XwmnFCVzFEEiPQfF8CwHIz2wsCbxpZrJtYgw,5061
12
12
  pyerualjetwork/model_operations.py,sha256=RKqnh7-MByFosxqme4q4jC1lOndX26O-OVXYV6ZxoEE,12965
13
13
  pyerualjetwork/model_operations_cuda.py,sha256=XnKKq54ZLaqCm-NaJ6d8IToACKcKg2Ttq6moowVRRWo,13365
14
- pyerualjetwork/plan.py,sha256=-Dz9yuqnx8sS5i9R6ihapXB1AEnqwDtaJ_GT-U-Qn6g,32221
15
- pyerualjetwork/plan_cuda.py,sha256=tfSld2_ywbO4E7kWarXHRHDHrYnhncqPAbugibP83uQ,33615
14
+ pyerualjetwork/plan.py,sha256=YOBF2CqGu400Zk6xuraP0X8WzMNyejpZc5tdVV4dEvE,32219
15
+ pyerualjetwork/plan_cuda.py,sha256=OKK0pmJYLQd5-dJ1aLiyWiZRBmoUp1zBkFxRcxnWBVI,33610
16
16
  pyerualjetwork/planeat.py,sha256=hMSyrSPipOxKgOqyoAiZtniVgxPQxc4rRsvEEMOS2Ng,40757
17
17
  pyerualjetwork/planeat_cuda.py,sha256=9uopmM-gTZpSb0EOExrOZPT8FF5BqDdEfCX0zYQb9QU,40712
18
18
  pyerualjetwork/ui.py,sha256=wu2BhU1k-w3Kcho5Jtq4SEKe68ftaUeRGneUOSCVDjU,575
19
- pyerualjetwork/visualizations.py,sha256=QaYSIyVkJZ8NqpBKArQKkI1y37nCQo_KIM98IMssnRc,28766
20
- pyerualjetwork/visualizations_cuda.py,sha256=F60vQ92AXlMgBka3InXnOtGoM25vQJAlBIU2AlYTwks,29200
21
- pyerualjetwork-4.2.2b9.dist-info/METADATA,sha256=8k0QMScW_w2NKSbKMph0JPzSWX2tXM3ct9hdS_vuYCQ,7914
22
- pyerualjetwork-4.2.2b9.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
23
- pyerualjetwork-4.2.2b9.dist-info/top_level.txt,sha256=BRyt62U_r3ZmJpj-wXNOoA345Bzamrj6RbaWsyW4tRg,15
24
- pyerualjetwork-4.2.2b9.dist-info/RECORD,,
19
+ pyerualjetwork/visualizations.py,sha256=1SKMZaJ80OD2qHUyMxW1IOv8zwmxzMPxclfbeq1Xr4g,28772
20
+ pyerualjetwork/visualizations_cuda.py,sha256=KbMhfsLlxujy_i3QrwCf734Q-k6d7Zn_7CEbm3gzK9w,29186
21
+ pyerualjetwork-4.2.3.dist-info/METADATA,sha256=f5KIbL0mISOhbhHGoj3WhXS0chLm6GSyEq3dsnyeYrQ,7912
22
+ pyerualjetwork-4.2.3.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
23
+ pyerualjetwork-4.2.3.dist-info/top_level.txt,sha256=BRyt62U_r3ZmJpj-wXNOoA345Bzamrj6RbaWsyW4tRg,15
24
+ pyerualjetwork-4.2.3.dist-info/RECORD,,