pyerualjetwork 4.0.6__tar.gz → 4.0.8__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/PKG-INFO +1 -1
  2. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/pyerualjetwork/__init__.py +1 -1
  3. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/pyerualjetwork/plan.py +18 -10
  4. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/pyerualjetwork/plan_cuda.py +18 -5
  5. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/pyerualjetwork.egg-info/PKG-INFO +1 -1
  6. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/setup.py +1 -1
  7. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/README.md +0 -0
  8. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/pyerualjetwork/activation_functions.py +0 -0
  9. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/pyerualjetwork/activation_functions_cuda.py +0 -0
  10. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/pyerualjetwork/data_operations.py +0 -0
  11. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/pyerualjetwork/data_operations_cuda.py +0 -0
  12. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/pyerualjetwork/help.py +0 -0
  13. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/pyerualjetwork/loss_functions.py +0 -0
  14. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/pyerualjetwork/loss_functions_cuda.py +0 -0
  15. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/pyerualjetwork/metrics.py +0 -0
  16. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/pyerualjetwork/metrics_cuda.py +0 -0
  17. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/pyerualjetwork/model_operations.py +0 -0
  18. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/pyerualjetwork/model_operations_cuda.py +0 -0
  19. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/pyerualjetwork/planeat.py +0 -0
  20. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/pyerualjetwork/planeat_cuda.py +0 -0
  21. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/pyerualjetwork/ui.py +0 -0
  22. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/pyerualjetwork/visualizations.py +0 -0
  23. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/pyerualjetwork/visualizations_cuda.py +0 -0
  24. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/pyerualjetwork.egg-info/SOURCES.txt +0 -0
  25. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/pyerualjetwork.egg-info/dependency_links.txt +0 -0
  26. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/pyerualjetwork.egg-info/top_level.txt +0 -0
  27. {pyerualjetwork-4.0.6 → pyerualjetwork-4.0.8}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyerualjetwork
3
- Version: 4.0.6
3
+ Version: 4.0.8
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
@@ -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.6"
50
+ __version__ = "4.0.8"
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__):
@@ -125,7 +125,15 @@ def fit(
125
125
 
126
126
  elif val and (x_val is not None and y_val is not None):
127
127
  x_val = x_val.astype(dtype, copy=False)
128
- y_val = y_val.astype(dtype, copy=False)
128
+ if len(y_val[0]) < 256:
129
+ if y_val.dtype != np.uint8:
130
+ y_val = np.array(y_val, copy=False).astype(np.uint8, copy=False)
131
+ elif len(y_val[0]) <= 32767:
132
+ if y_val.dtype != np.uint16:
133
+ y_val = np.array(y_val, copy=False).astype(np.uint16, copy=False)
134
+ else:
135
+ if y_val.dtype != np.uint32:
136
+ y_val = np.array(y_val, copy=False).astype(np.uint32, copy=False)
129
137
 
130
138
  val_list = [] if val else None
131
139
  val_count = val_count or 10
@@ -244,15 +252,15 @@ def learner(x_train, y_train, x_test=None, y_test=None, strategy='accuracy', bat
244
252
  if x_test is not None:
245
253
  x_test = x_test.astype(dtype, copy=False)
246
254
 
247
- if len(y_test[0]) < 256:
248
- if y_test.dtype != np.uint8:
249
- y_test = np.array(y_test, copy=False).astype(np.uint8, copy=False)
250
- elif len(y_test[0]) <= 32767:
251
- if y_test.dtype != np.uint16:
252
- y_test = np.array(y_test, copy=False).astype(np.uint16, copy=False)
253
- else:
254
- if y_test.dtype != np.uint32:
255
- y_test = np.array(y_test, copy=False).astype(np.uint32, copy=False)
255
+ if len(y_test[0]) < 256:
256
+ if y_test.dtype != np.uint8:
257
+ y_test = np.array(y_test, copy=False).astype(np.uint8, copy=False)
258
+ elif len(y_test[0]) <= 32767:
259
+ if y_test.dtype != np.uint16:
260
+ y_test = np.array(y_test, copy=False).astype(np.uint16, copy=False)
261
+ else:
262
+ if y_test.dtype != np.uint32:
263
+ y_test = np.array(y_test, copy=False).astype(np.uint32, copy=False)
256
264
 
257
265
  if x_test is None and y_test is None:
258
266
  x_test = x_train
@@ -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.6
3
+ Version: 4.0.8
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
@@ -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="4.0.6",
9
+ version="4.0.8",
10
10
  author="Hasan Can Beydili",
11
11
  author_email="tchasancan@gmail.com",
12
12
  description=(
File without changes
File without changes