pyerualjetwork 4.0.7__py3-none-any.whl → 4.0.9__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.
@@ -47,7 +47,7 @@ for package_name in package_names:
47
47
 
48
48
  print(f"PyerualJetwork is ready to use with {err} errors")
49
49
 
50
- __version__ = "4.0.7"
50
+ __version__ = "4.0.9"
51
51
  __update__ = "* Note: CUDA modules need cupy. Enter this command in your terminal: 'pip install cupy-cuda12x' or your cuda version.\n* Changes: https://github.com/HCB06/PyerualJetwork/blob/main/CHANGES\n* PyerualJetwork document: https://github.com/HCB06/Anaplan/blob/main/Welcome_to_PyerualJetwork/PYERUALJETWORK_USER_MANUEL_AND_LEGAL_INFORMATION(EN).pdf\n* YouTube tutorials: https://www.youtube.com/@HasanCanBeydili"
52
52
 
53
53
  def print_version(__version__):
@@ -322,8 +322,7 @@ def synthetic_augmentation(x_train, y_train, dtype=cp.float32):
322
322
  class_count = len(classes)
323
323
  class_distribution = {i: 0 for i in range(class_count)}
324
324
 
325
- y_cpu = cp.asnumpy(y) if isinstance(y, cp.ndarray) else y
326
- for label in y_cpu:
325
+ for label in y:
327
326
  class_distribution[cp.argmax(label).item()] += 1
328
327
 
329
328
  max_class_count = max(class_distribution.values())
@@ -120,9 +120,22 @@ def fit(
120
120
  if len(x_train) != len(y_train):
121
121
  raise ValueError("x_train and y_train must have the same length.")
122
122
 
123
- if val and (x_val is None or y_val is None):
123
+ if val and (x_val is None and y_val is None):
124
124
  x_val, y_val = x_train, y_train
125
125
 
126
+ elif val and (x_val is not None and y_val is not None):
127
+ x_val = cp.array(x_val, copy=False).astype(dtype, copy=False)
128
+
129
+ if len(y_val[0]) < 256:
130
+ if y_val.dtype != cp.uint8:
131
+ y_val = cp.array(y_val, copy=False).astype(cp.uint8, copy=False)
132
+ elif len(y_val[0]) <= 32767:
133
+ if y_val.dtype != cp.uint16:
134
+ y_val = cp.array(y_val, copy=False).astype(cp.uint16, copy=False)
135
+ else:
136
+ if y_val.dtype != cp.uint32:
137
+ y_val = cp.array(y_val, copy=False).astype(cp.uint32, copy=False)
138
+
126
139
  val_list = [] if val else None
127
140
  val_count = val_count or 10
128
141
  # Defining weights
@@ -284,9 +297,9 @@ def learner(x_train, y_train, x_test=None, y_test=None, strategy='accuracy', bat
284
297
 
285
298
  # Initialize progress bar
286
299
  if batch_size == 1:
287
- ncols = 100
300
+ ncols = 90
288
301
  else:
289
- ncols = 140
302
+ ncols = 103
290
303
  progress = initialize_loading_bar(total=len(activation_potentiation), desc="", ncols=ncols, bar_format=bar_format_learner)
291
304
 
292
305
  # Initialize variables
@@ -297,8 +310,8 @@ def learner(x_train, y_train, x_test=None, y_test=None, strategy='accuracy', bat
297
310
  else:
298
311
  best_activations = start_this
299
312
  x_test_batch, y_test_batch = batcher(x_test, y_test, batch_size=batch_size)
300
- W = fit(x_train, y_train, activation_potentiation=best_activations, train_bar=False, auto_normalization=auto_normalization)
301
- model = evaluate(x_test_batch, y_test_batch, W=W, loading_bar_status=False, activation_potentiation=activations)
313
+ W = fit(x_train, y_train, activation_potentiation=best_activations, train_bar=False, auto_normalization=auto_normalization, dtype=dtype)
314
+ model = evaluate(x_test_batch, y_test_batch, W=W, loading_bar_status=False, activation_potentiation=activations, dtype=dtype)
302
315
 
303
316
  if loss == 'categorical_crossentropy':
304
317
  test_loss = categorical_crossentropy(y_true_batch=y_test_batch, y_pred_batch=model[get_preds_softmax()])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyerualjetwork
3
- Version: 4.0.7
3
+ Version: 4.0.9
4
4
  Summary: PyerualJetwork is a machine learning library written in Python for professionals, incorporating advanced, unique, new, and modern techniques.
5
5
  Author: Hasan Can Beydili
6
6
  Author-email: tchasancan@gmail.com
@@ -1,8 +1,8 @@
1
- pyerualjetwork/__init__.py,sha256=i_pt-vpEDdNMFEVgM_LjkJ-_bmhTswIYaZTUC-LsRps,2542
1
+ pyerualjetwork/__init__.py,sha256=uZmH51cnYfltC9nx5AYHXyAXxiWAXcLzjiCJ7K0uO_4,2542
2
2
  pyerualjetwork/activation_functions.py,sha256=UeuuagJWcSoFfmwikDU7O8ph--oySnWDJNqKbEh4SlE,12043
3
3
  pyerualjetwork/activation_functions_cuda.py,sha256=5F49gKkiRngo0hAaS1KfarxQ7wEyub13WAX_apxf8j8,12069
4
4
  pyerualjetwork/data_operations.py,sha256=rnOYLLK3YnRdWpEsEQABU0RE950lQQI7971eBLBpqOQ,16536
5
- pyerualjetwork/data_operations_cuda.py,sha256=hh51PQORfQicWruu9Bo-HAJW56lQkoG2QZOBoTjFGkw,17175
5
+ pyerualjetwork/data_operations_cuda.py,sha256=8jooTsRCC-pEYvtw8c6CsfUUnztDy8DI8-yLf9aX27A,17108
6
6
  pyerualjetwork/help.py,sha256=pZs7hIhgFkovGLle97d9Qu9m5zKhMh7-OAIphIoSxBg,830
7
7
  pyerualjetwork/loss_functions.py,sha256=6PyBI232SQRGuFnG3LDGvnv_PUdWzT2_2mUODJiejGI,618
8
8
  pyerualjetwork/loss_functions_cuda.py,sha256=C93IZJcrOpT6HMK9x1O4AHJWXYTkN5WZiqdssPbvAPk,617
@@ -11,13 +11,13 @@ pyerualjetwork/metrics_cuda.py,sha256=TCwn5Z_4jQjqPCURX_xtcz9cjsYVzlahgKDA-qCgpU
11
11
  pyerualjetwork/model_operations.py,sha256=k_53BJladPm9fBWdlVpS6Uf5IQzpNlJWLH746DXGq_M,13036
12
12
  pyerualjetwork/model_operations_cuda.py,sha256=Guo0lFaaLiAXwKmnOi8Fz_bL_p38qR46CIhGOg_V1Sw,13138
13
13
  pyerualjetwork/plan.py,sha256=iF0zIaO2KrPYF8G__-Q2wMYbgQEIdRWap3BBMRZ1Fpo,34746
14
- pyerualjetwork/plan_cuda.py,sha256=JF2LK5BgDZAQb3LuPDCyz8G7ICEvEg8BWezeZdw8X-4,33920
14
+ pyerualjetwork/plan_cuda.py,sha256=Yke5vsmhrsKIpCOYoPNBqLzBHfjqsXuT7RrmMXNNmQc,34541
15
15
  pyerualjetwork/planeat.py,sha256=8cwWboJtXgFTKq6nFl1T9McbLDmBquKUr12y168PmcM,39513
16
16
  pyerualjetwork/planeat_cuda.py,sha256=boN-HFwm_D9cT1z0eAR8zgkiD_XOg-J2T2jNFvZweG4,39570
17
17
  pyerualjetwork/ui.py,sha256=wu2BhU1k-w3Kcho5Jtq4SEKe68ftaUeRGneUOSCVDjU,575
18
18
  pyerualjetwork/visualizations.py,sha256=DvbiQGlvlKNAgBJ3O3ukAi6uxSheha9SRFh5YX7ZxIA,26678
19
19
  pyerualjetwork/visualizations_cuda.py,sha256=dA0u85ZIyKqjtoSJ6p3EbEpJs4V4vS5W5ftR6eif8yg,26713
20
- pyerualjetwork-4.0.7.dist-info/METADATA,sha256=BWCx6dmY3FC-ud-gC_8ukAcE6-4o-wrU1xIItVeadDw,6357
21
- pyerualjetwork-4.0.7.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
22
- pyerualjetwork-4.0.7.dist-info/top_level.txt,sha256=BRyt62U_r3ZmJpj-wXNOoA345Bzamrj6RbaWsyW4tRg,15
23
- pyerualjetwork-4.0.7.dist-info/RECORD,,
20
+ pyerualjetwork-4.0.9.dist-info/METADATA,sha256=Lcj4n5zrTRr_NnHyPJhqu8CvNRLc7TgbD9qRF7Rt07s,6357
21
+ pyerualjetwork-4.0.9.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
22
+ pyerualjetwork-4.0.9.dist-info/top_level.txt,sha256=BRyt62U_r3ZmJpj-wXNOoA345Bzamrj6RbaWsyW4tRg,15
23
+ pyerualjetwork-4.0.9.dist-info/RECORD,,