pyerualjetwork 4.2.9b5__py3-none-any.whl → 4.2.9b7__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.9b5"
1
+ __version__ = "4.2.9b7"
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__):
@@ -218,12 +218,14 @@ def scaled_cubic(x, alpha=1.0):
218
218
  def sine_offset(x, beta=0.0):
219
219
  return np.sin(x + beta)
220
220
 
221
+
221
222
  def safe_add(current_sum, new_value):
222
223
  try:
223
224
  return current_sum + new_value
224
225
  except OverflowError:
225
226
  return np.array(current_sum) + np.array(new_value)
226
227
 
228
+
227
229
  def apply_activation(Input, activation_list):
228
230
  """
229
231
  Applies a sequence of activation functions to the input.
@@ -218,23 +218,23 @@ def sine_offset(x, beta=0.0):
218
218
  return cp.sin(x + beta)
219
219
 
220
220
 
221
-
222
221
  def safe_add(current_sum, new_value):
223
222
  try:
224
223
  return current_sum + new_value
225
224
  except OverflowError:
226
225
  return cp.array(current_sum) + cp.array(new_value)
227
226
 
227
+
228
228
  def apply_activation(Input, activation_list):
229
229
  """
230
230
  Applies a sequence of activation functions to the input.
231
231
 
232
232
  Args:
233
- Input (numpy.ndarray): The input to apply activations to.
233
+ Input (cupy.ndarray): The input to apply activations to.
234
234
  activation_list (list): A list of activation function names to apply.
235
235
 
236
236
  Returns:
237
- numpy.ndarray: The input after all activations have been applied.
237
+ cupy.ndarray: The input after all activations have been applied.
238
238
  """
239
239
 
240
240
  origin_input = cp.copy(Input)
@@ -308,7 +308,7 @@ def apply_activation(Input, activation_list):
308
308
  elif activation_list[i] == 'mod_sigmoid':
309
309
  Input = safe_add(Input, mod_sigmoid(origin_input))
310
310
  elif activation_list[i] == 'linear':
311
- Input = safe_add(Input, origin_input)
311
+ Input += origin_input
312
312
  elif activation_list[i] == 'quartic':
313
313
  Input = safe_add(Input, quartic(origin_input))
314
314
  elif activation_list[i] == 'square_quartic':
@@ -613,26 +613,25 @@ def evaluate(
613
613
  real_classes = cp.empty(len(x_test), dtype=y_test.dtype)
614
614
  predict_classes = cp.empty(len(x_test), dtype=y_test.dtype)
615
615
 
616
- true_predict = cp.array(0)
616
+ true_predict = 0
617
617
  acc_list = cp.empty(len(x_test), dtype=dtype)
618
618
 
619
619
  if loading_bar_status:
620
620
  loading_bar = initialize_loading_bar(total=len(x_test), ncols=64, desc='Testing', bar_format=bar_format_normal)
621
621
 
622
622
  for inpIndex in range(len(x_test)):
623
- Input = x_test[inpIndex].ravel()
623
+ Input = transfer_to_gpu(x_test[inpIndex], dtype=dtype).ravel()
624
624
  neural_layer = Input
625
625
 
626
626
  neural_layer = feed_forward(neural_layer, cp.copy(W), is_training=False, Class='?', activation_potentiation=activation_potentiation)
627
627
 
628
628
  predict_probabilitys[inpIndex] = Softmax(neural_layer)
629
629
 
630
- RealOutput = cp.argmax(y_test[inpIndex])
630
+ RealOutput = decode_one_hot(transfer_to_gpu(y_test[inpIndex], dtype=y_test[inpIndex].dtype))
631
631
  real_classes[inpIndex] = RealOutput
632
632
  PredictedOutput = cp.argmax(neural_layer)
633
633
  predict_classes[inpIndex] = PredictedOutput
634
634
 
635
-
636
635
  if RealOutput == PredictedOutput:
637
636
  true_predict += 1
638
637
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyerualjetwork
3
- Version: 4.2.9b5
3
+ Version: 4.2.9b7
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,6 +1,6 @@
1
- pyerualjetwork/__init__.py,sha256=E4A4fJ8Kjh_jX6a15l-2Th318VV7tuGU9IGT1YGNzIc,641
2
- pyerualjetwork/activation_functions.py,sha256=WWOdMd5pI6ZKe-ieKCIsKAYPQODHuXYxx7tzhA5xjes,11767
3
- pyerualjetwork/activation_functions_cuda.py,sha256=KmXJ5Cdig46XAMYakXFPEOlxSxtFJjD21-i3nGtxPjE,11807
1
+ pyerualjetwork/__init__.py,sha256=-UIV7CqxZoriiu5trhAYI1q_ztU6L6nky-nOFm1p9l0,641
2
+ pyerualjetwork/activation_functions.py,sha256=eLEesmMgDvkI1TqaLTpqtOgTaLbHEAyw-D57KIKd9G4,11775
3
+ pyerualjetwork/activation_functions_cuda.py,sha256=ahUOF47g073epWrIrv4kGBqQjif1xcw3qfEhvLJEDp4,11789
4
4
  pyerualjetwork/data_operations.py,sha256=pb5CqJ0Th6fCjTNMCtqQMiwH3KezTxAijacglsKUxmY,14730
5
5
  pyerualjetwork/data_operations_cuda.py,sha256=UpoJoFhIwTU4xg9dVuLAxLAT4CkRaGsxvtJG9j1xrNo,17629
6
6
  pyerualjetwork/help.py,sha256=nQ_YbYA2RtuafhuvkreNpX0WWL1I_nzlelwCtvei0_Y,775
@@ -12,13 +12,13 @@ pyerualjetwork/metrics_cuda.py,sha256=73h9GC7XwmnFCVzFEEiPQfF8CwHIz2wsCbxpZrJtYg
12
12
  pyerualjetwork/model_operations.py,sha256=RKqnh7-MByFosxqme4q4jC1lOndX26O-OVXYV6ZxoEE,12965
13
13
  pyerualjetwork/model_operations_cuda.py,sha256=XnKKq54ZLaqCm-NaJ6d8IToACKcKg2Ttq6moowVRRWo,13365
14
14
  pyerualjetwork/plan.py,sha256=UzCTFCA9cTv9ITCtsqfJ1g02rCMyescoIV6j1amvYGw,32134
15
- pyerualjetwork/plan_cuda.py,sha256=nPUMSt9kkUjFLpUtEYBCKbQnSZ3dU-gCz4s6ItPPqG4,33463
15
+ pyerualjetwork/plan_cuda.py,sha256=hpXZl3h7B1qAVYW-gZebwKMZd4-ftAZ-u05teOJjsno,33525
16
16
  pyerualjetwork/planeat.py,sha256=t6qyuMB2c5n8lsAJooEpShzEnw2GvepBI0bpLMx0DUI,39440
17
17
  pyerualjetwork/planeat_cuda.py,sha256=UBdbAk87M5zEZzZlRBeOzW-q0Sy8c_XWl4zdrtDnyIs,39499
18
18
  pyerualjetwork/ui.py,sha256=wu2BhU1k-w3Kcho5Jtq4SEKe68ftaUeRGneUOSCVDjU,575
19
19
  pyerualjetwork/visualizations.py,sha256=1SKMZaJ80OD2qHUyMxW1IOv8zwmxzMPxclfbeq1Xr4g,28772
20
20
  pyerualjetwork/visualizations_cuda.py,sha256=KbMhfsLlxujy_i3QrwCf734Q-k6d7Zn_7CEbm3gzK9w,29186
21
- pyerualjetwork-4.2.9b5.dist-info/METADATA,sha256=fmonx8KCR6H1tooW3_fDTeZsyFg2OPGsCSb889YDiwU,7454
22
- pyerualjetwork-4.2.9b5.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
23
- pyerualjetwork-4.2.9b5.dist-info/top_level.txt,sha256=BRyt62U_r3ZmJpj-wXNOoA345Bzamrj6RbaWsyW4tRg,15
24
- pyerualjetwork-4.2.9b5.dist-info/RECORD,,
21
+ pyerualjetwork-4.2.9b7.dist-info/METADATA,sha256=hqgQTjNLjoljou-abs6HJwbCoeHlnrkZTcmU91-rB7c,7454
22
+ pyerualjetwork-4.2.9b7.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
23
+ pyerualjetwork-4.2.9b7.dist-info/top_level.txt,sha256=BRyt62U_r3ZmJpj-wXNOoA345Bzamrj6RbaWsyW4tRg,15
24
+ pyerualjetwork-4.2.9b7.dist-info/RECORD,,