pyerualjetwork 2.2.5__tar.gz → 2.2.7__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyerualjetwork
3
- Version: 2.2.5
3
+ Version: 2.2.7
4
4
  Summary: Code improvements (Documentation in desc. Examples in GİTHUB: https://github.com/HCB06/PyerualJetwork)
5
5
  Author: Hasan Can Beydili
6
6
  Author-email: tchasancan@gmail.com
@@ -61,6 +61,7 @@ def fit(
61
61
  W = weight_identification(len(layers) - 1,len(class_count),neurons,x_train_size)
62
62
  trained_W = [1] * len(W)
63
63
  print(Fore.GREEN + "Train Started with 0 ERROR" + Style.RESET_ALL,)
64
+ y = decode_one_hot(y_train)
64
65
  start_time = time.time()
65
66
  for index, inp in enumerate(x_train):
66
67
  uni_start_time = time.time()
@@ -76,11 +77,10 @@ def fit(
76
77
 
77
78
  for Lindex, Layer in enumerate(layers):
78
79
 
79
- y = np.argmax(y_train[index])
80
80
  neural_layer = normalization(neural_layer)
81
81
 
82
82
  if Layer == 'fex':
83
- W[Lindex] = fex(neural_layer, W[Lindex], activation_potential, True, y)
83
+ W[Lindex] = fex(neural_layer, W[Lindex], activation_potential, True, y[index])
84
84
 
85
85
 
86
86
  for i, w in enumerate(W):
@@ -1,6 +1,4 @@
1
1
 
2
- import time
3
- from colorama import Fore
4
2
  """
5
3
  Created on Thu Jun 12 00:00:00 2024
6
4
 
@@ -65,11 +63,12 @@ def fit(
65
63
  trained_W = [1] * len(W)
66
64
  print(Fore.GREEN + "Train Started with 0 ERROR" + Style.RESET_ALL)
67
65
  start_time = time.time()
66
+ y = decode_one_hot(y_train)
68
67
  for index, inp in enumerate(x_train):
69
68
  uni_start_time = time.time()
70
69
  inp = np.array(inp)
71
70
  inp = inp.ravel()
72
-
71
+
73
72
  if x_train_size != len(inp):
74
73
  print(Fore.RED + "ERROR304: All input matrices or vectors in x_train list, must be same size. from: fit",
75
74
  infoPLAN + Style.RESET_ALL)
@@ -81,12 +80,11 @@ def fit(
81
80
 
82
81
  neural_layer = normalization(neural_layer)
83
82
 
84
- y = np.argmax(y_train[index])
85
83
  if Layer == 'fex':
86
- W[Lindex] = fex(neural_layer, W[Lindex], True, y)
84
+ W[Lindex] = fex(neural_layer, W[Lindex], True, y[index])
87
85
 
88
86
  for i, w in enumerate(W):
89
- trained_W[i] = trained_W[i] + w
87
+ trained_W[i] = trained_W[i] + w
90
88
 
91
89
  W = weight_identification(
92
90
  len(layers) - 1, len(class_count), neurons, x_train_size)
@@ -121,7 +119,7 @@ def fit(
121
119
 
122
120
  elif calculating_est > 3600:
123
121
  print('Total training time(h): ', calculating_est/3600)
124
-
122
+
125
123
  return trained_W
126
124
 
127
125
  # FUNCTIONS -----
@@ -520,7 +518,6 @@ def save_model(model_name,
520
518
  model_name (str): Name of the model.
521
519
  model_type (str): Type of the model.(options: PLAN)
522
520
  class_count (int): Number of classes.
523
- activation_potential (float): Activation potential.
524
521
  test_acc (float): Test accuracy of the model.
525
522
  weights_type (str): Type of weights to save (options: 'txt', 'npy', 'mat').
526
523
  WeightFormat (str): Format of the weights (options: 'd', 'f', 'raw').
@@ -1315,5 +1312,4 @@ def get_preds():
1315
1312
 
1316
1313
  def get_acc():
1317
1314
 
1318
- return 2
1319
-
1315
+ return 2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyerualjetwork
3
- Version: 2.2.5
3
+ Version: 2.2.7
4
4
  Summary: Code improvements (Documentation in desc. Examples in GİTHUB: https://github.com/HCB06/PyerualJetwork)
5
5
  Author: Hasan Can Beydili
6
6
  Author-email: tchasancan@gmail.com
@@ -5,7 +5,7 @@ from setuptools import setup, find_packages
5
5
  setup(
6
6
 
7
7
  name = "pyerualjetwork",
8
- version = "2.2.5",
8
+ version = "2.2.7",
9
9
  author = "Hasan Can Beydili",
10
10
  author_email = "tchasancan@gmail.com",
11
11
  description= "Code improvements (Documentation in desc. Examples in GİTHUB: https://github.com/HCB06/PyerualJetwork)",
File without changes