pyerualjetwork 5.46__py3-none-any.whl → 5.47b0__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.
- pyerualjetwork/__init__.py +1 -1
- pyerualjetwork/cpu/visualizations.py +1 -3
- pyerualjetwork/nn.py +10 -5
- {pyerualjetwork-5.46.dist-info → pyerualjetwork-5.47b0.dist-info}/METADATA +1 -1
- {pyerualjetwork-5.46.dist-info → pyerualjetwork-5.47b0.dist-info}/RECORD +7 -7
- {pyerualjetwork-5.46.dist-info → pyerualjetwork-5.47b0.dist-info}/WHEEL +0 -0
- {pyerualjetwork-5.46.dist-info → pyerualjetwork-5.47b0.dist-info}/top_level.txt +0 -0
pyerualjetwork/__init__.py
CHANGED
@@ -42,7 +42,7 @@ PyerualJetwork document: https://github.com/HCB06/PyerualJetwork/blob/main/Welco
|
|
42
42
|
- Contact: tchasancan@gmail.com
|
43
43
|
"""
|
44
44
|
|
45
|
-
__version__ = "5.
|
45
|
+
__version__ = "5.47b0"
|
46
46
|
__update__ = """* Changes: https://github.com/HCB06/PyerualJetwork/blob/main/CHANGES
|
47
47
|
* PyerualJetwork Homepage: https://github.com/HCB06/PyerualJetwork/tree/main
|
48
48
|
* PyerualJetwork document: https://github.com/HCB06/PyerualJetwork/blob/main/Welcome_to_PyerualJetwork/PYERUALJETWORK_USER_MANUEL_AND_LEGAL_INFORMATION(EN).pdf
|
@@ -275,7 +275,7 @@ def draw_activations(x_train, activation):
|
|
275
275
|
return x_train
|
276
276
|
|
277
277
|
|
278
|
-
def plot_evaluate(x_test, y_test, y_preds, model, cuda=False):
|
278
|
+
def plot_evaluate(x_test, y_test, y_preds, model, acc, cuda=False):
|
279
279
|
|
280
280
|
if not cuda:
|
281
281
|
from .metrics import metrics, confusion_matrix, roc_curve
|
@@ -287,8 +287,6 @@ def plot_evaluate(x_test, y_test, y_preds, model, cuda=False):
|
|
287
287
|
|
288
288
|
from ..model_ops import predict_from_memory
|
289
289
|
|
290
|
-
acc = model.accuracy
|
291
|
-
|
292
290
|
y_true = decode_one_hot(y_test)
|
293
291
|
y_preds = decode_one_hot(y_preds)
|
294
292
|
|
pyerualjetwork/nn.py
CHANGED
@@ -314,12 +314,17 @@ def learn(x_train, y_train, optimizer, template_model, gen, pop_size, fit_start=
|
|
314
314
|
# TRANSFORMATION PLAN TO MLP FOR PTNN (in later generations)
|
315
315
|
if model_type == 'PLAN' and transfer_learning:
|
316
316
|
if i == gen_copy[0]:
|
317
|
+
|
318
|
+
if cuda:
|
319
|
+
array_type = cp
|
320
|
+
else:
|
321
|
+
array_type = np
|
317
322
|
|
318
323
|
model_type = 'PTNN'
|
319
324
|
neurons = neurons_copy
|
320
325
|
|
321
326
|
for individual in range(len(weight_pop)):
|
322
|
-
weight_pop[individual] =
|
327
|
+
weight_pop[individual] = array_type.copy(best_weight)
|
323
328
|
activation_potentiations[individual] = final_activations.copy() if isinstance(final_activations, list) else final_activations
|
324
329
|
|
325
330
|
activation_potentiation = activation_potentiations[0]
|
@@ -333,13 +338,13 @@ def learn(x_train, y_train, optimizer, template_model, gen, pop_size, fit_start=
|
|
333
338
|
for l in range(1, len(weight_pop[0])):
|
334
339
|
original_shape = weight_pop[0][l].shape
|
335
340
|
|
336
|
-
identity_matrix =
|
341
|
+
identity_matrix = array_type.eye(original_shape[0], original_shape[1], dtype=weight_pop[0][l].dtype)
|
337
342
|
weight_pop[0][l] = identity_matrix
|
338
343
|
|
339
344
|
for l in range(len(weight_pop)):
|
340
|
-
weight_pop[l][0] =
|
345
|
+
weight_pop[l][0] = array_type.copy(best_weight)
|
341
346
|
|
342
|
-
best_weight =
|
347
|
+
best_weight = array_type.array(weight_pop[0], dtype=object)
|
343
348
|
final_activations = act_pop[0]
|
344
349
|
is_mlp = True
|
345
350
|
fit_start = False
|
@@ -684,6 +689,6 @@ def evaluate(
|
|
684
689
|
softmax_preds = array_type.exp(result - max_vals) / array_type.sum(array_type.exp(result - max_vals), axis=1, keepdims=True)
|
685
690
|
accuracy = (array_type.argmax(softmax_preds, axis=1) == array_type.argmax(y_test, axis=1)).mean()
|
686
691
|
|
687
|
-
if show_report: plot_evaluate(x_test, y_test, result, model=model, cuda=cuda)
|
692
|
+
if show_report: plot_evaluate(x_test, y_test, result, acc=accuracy, model=model, cuda=cuda)
|
688
693
|
|
689
694
|
return W, result, accuracy, None, None, softmax_preds
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pyerualjetwork
|
3
|
-
Version: 5.
|
3
|
+
Version: 5.47b0
|
4
4
|
Summary: PyereualJetwork is a GPU-accelerated machine learning library in Python for professionals and researchers. It features PLAN, MLP, Deep Learning training, and ENE (Eugenic NeuroEvolution) for genetic optimization, applicable to genetic algorithms or Reinforcement Learning (RL). The library includes data pre-processing, visualizations, model saving/loading, prediction, evaluation, training, and detailed or simplified memory management.
|
5
5
|
Author: Hasan Can Beydili
|
6
6
|
Author-email: tchasancan@gmail.com
|
@@ -1,11 +1,11 @@
|
|
1
|
-
pyerualjetwork/__init__.py,sha256=
|
1
|
+
pyerualjetwork/__init__.py,sha256=83JqHyw4IH4Q7UYP7dEobblHD-olA-17hUNYtN9cQkU,3022
|
2
2
|
pyerualjetwork/ene.py,sha256=8g2XEPRm3NLqSaN7xihIj1xXdIjSrl8Q69zqWTIXPI4,42142
|
3
3
|
pyerualjetwork/fitness_functions.py,sha256=D9JVCr9DFid_xXgBD4uCKxdW2k10MVDE5HZRSOK4Igg,1237
|
4
4
|
pyerualjetwork/help.py,sha256=sn9jBzXkQsTZvdgsUXUpSs_BbYYIgY3whofg6dj8peI,848
|
5
5
|
pyerualjetwork/issue_solver.py,sha256=uay_9XK6xWnLmK2P_BeyDQlyNXzg_zYffnXYd228wZk,4102
|
6
6
|
pyerualjetwork/memory_ops.py,sha256=TUFh9SYWCKL6N-vNdWId_EwU313TuZomQCHOrltrD-4,14280
|
7
7
|
pyerualjetwork/model_ops.py,sha256=39eUKrj0VKYiEYWKcq1U8O0TV_QMrxkuy8IhCHQsEcw,25101
|
8
|
-
pyerualjetwork/nn.py,sha256=
|
8
|
+
pyerualjetwork/nn.py,sha256=3r9lxrrUYwbrqx84AhflcPPvbaCwwkpnXF01g8s7v9w,36835
|
9
9
|
pyerualjetwork/old_cpu_model_ops.py,sha256=1KNgjUeYCO_TsA5RtbNiuIiBJzq8-rL2dE6jxKqCBU0,21481
|
10
10
|
pyerualjetwork/old_cuda_model_ops.py,sha256=KAscAd8e_I8Vqdd9BJaHd6-IG6fhxFglAFxys0sqmEo,23079
|
11
11
|
pyerualjetwork/ui.py,sha256=JBTFYz5R24XwNKhA3GSW-oYAoiIBxAE3kFGXkvm5gqw,656
|
@@ -14,14 +14,14 @@ pyerualjetwork/cpu/activation_functions.py,sha256=zZSoOQ452Ykp_RsHVxklxesJmmFguf
|
|
14
14
|
pyerualjetwork/cpu/data_ops.py,sha256=SPsIcjU0JPHfsnEmGjD8q-yTlpgYk-KPOPJ44dfp-nU,16143
|
15
15
|
pyerualjetwork/cpu/loss_functions.py,sha256=6PyBI232SQRGuFnG3LDGvnv_PUdWzT2_2mUODJiejGI,618
|
16
16
|
pyerualjetwork/cpu/metrics.py,sha256=NF8FARAqtuGlf4omVkQT4pOQZy7uePqzuHZGX9Y_Pn4,6076
|
17
|
-
pyerualjetwork/cpu/visualizations.py,sha256=
|
17
|
+
pyerualjetwork/cpu/visualizations.py,sha256=RcEZXX-U3BStOna1-C_a7z2VpXHuLAigeg1pD4u8I9I,26923
|
18
18
|
pyerualjetwork/cuda/__init__.py,sha256=Kja6OmNaJ0giOhRNYw9hgGkh5N4F1EUS2v94E_rmp2k,839
|
19
19
|
pyerualjetwork/cuda/activation_functions.py,sha256=Gj-qalU0GoAWoZzbFFHsD-R0c0KzHwOK1wwUQneBE44,6872
|
20
20
|
pyerualjetwork/cuda/data_ops.py,sha256=k7NX-ckZ6-NwvioigACUHrekG7L5lO4bzTtQbBwH1Fc,18508
|
21
21
|
pyerualjetwork/cuda/loss_functions.py,sha256=C93IZJcrOpT6HMK9x1O4AHJWXYTkN5WZiqdssPbvAPk,617
|
22
22
|
pyerualjetwork/cuda/metrics.py,sha256=PjDBoRvr6va8vRvDIJJGBO4-I4uumrk3NCM1Vz4NJTo,5054
|
23
23
|
pyerualjetwork/cuda/visualizations.py,sha256=2mHE7iqqsN3K6xtCnemS4o_YWGS0bIV2IxF4cG6Ur9k,20090
|
24
|
-
pyerualjetwork-5.
|
25
|
-
pyerualjetwork-5.
|
26
|
-
pyerualjetwork-5.
|
27
|
-
pyerualjetwork-5.
|
24
|
+
pyerualjetwork-5.47b0.dist-info/METADATA,sha256=-jbrSF5DZLdVFjMi80xETm6k8NKrbFPXgg0GW9ILqjc,7990
|
25
|
+
pyerualjetwork-5.47b0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
26
|
+
pyerualjetwork-5.47b0.dist-info/top_level.txt,sha256=BRyt62U_r3ZmJpj-wXNOoA345Bzamrj6RbaWsyW4tRg,15
|
27
|
+
pyerualjetwork-5.47b0.dist-info/RECORD,,
|
File without changes
|
File without changes
|