pyerualjetwork 2.8.2__py3-none-any.whl → 2.8.3__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.
plan/plan.py CHANGED
@@ -503,76 +503,76 @@ def evaluate(
503
503
  real_classes = []
504
504
  predict_classes = []
505
505
 
506
- #try:
507
- layers = ['fex']
506
+ try:
507
+ layers = ['fex']
508
508
 
509
- Wc = [0] * len(W) # Wc = Weight copy
510
- true = 0
511
- y_preds = []
512
- acc_list = []
513
-
514
- for i, w in enumerate(W):
515
- Wc[i] = np.copy(w)
509
+ Wc = [0] * len(W) # Wc = Weight copy
510
+ true = 0
511
+ y_preds = []
512
+ acc_list = []
516
513
 
517
-
518
- if bar_status == True:
514
+ for i, w in enumerate(W):
515
+ Wc[i] = np.copy(w)
516
+
517
+
518
+ if bar_status == True:
519
519
 
520
- test_progress = tqdm(total=len(x_test),leave=False, desc='Testing',ncols=120)
521
- acc_bar = tqdm(total=1, desc="Test Accuracy", ncols=120)
522
-
523
-
524
- for inpIndex, Input in enumerate(x_test):
525
- Input = np.array(Input)
526
- Input = Input.ravel()
527
- neural_layer = Input
520
+ test_progress = tqdm(total=len(x_test),leave=False, desc='Testing',ncols=120)
521
+ acc_bar = tqdm(total=1, desc="Test Accuracy", ncols=120)
522
+
523
+
524
+ for inpIndex, Input in enumerate(x_test):
525
+ Input = np.array(Input)
526
+ Input = Input.ravel()
527
+ neural_layer = Input
528
528
 
529
- for index, Layer in enumerate(layers):
529
+ for index, Layer in enumerate(layers):
530
530
 
531
- if Layer == 'fex':
532
- neural_layer = fex(neural_layer, W[index], False, None, activation_potentiation)
531
+ if Layer == 'fex':
532
+ neural_layer = fex(neural_layer, W[index], False, None, activation_potentiation)
533
533
 
534
534
 
535
- for i, w in enumerate(Wc):
536
- W[i] = np.copy(w)
537
-
538
- neural_layer = Softmax(neural_layer)
539
- max_value = max(neural_layer)
535
+ for i, w in enumerate(Wc):
536
+ W[i] = np.copy(w)
537
+
538
+ neural_layer = Softmax(neural_layer)
539
+ max_value = max(neural_layer)
540
540
 
541
- predict_probabilitys.append(max_value)
542
-
543
-
544
- RealOutput = np.argmax(y_test[inpIndex])
545
- real_classes.append(RealOutput)
546
- PredictedOutput = np.argmax(neural_layer)
547
- predict_classes.append(PredictedOutput)
541
+ predict_probabilitys.append(max_value)
542
+
543
+
544
+ RealOutput = np.argmax(y_test[inpIndex])
545
+ real_classes.append(RealOutput)
546
+ PredictedOutput = np.argmax(neural_layer)
547
+ predict_classes.append(PredictedOutput)
548
548
 
549
- if RealOutput == PredictedOutput:
550
- true += 1
551
- acc = true / len(y_test)
549
+ if RealOutput == PredictedOutput:
550
+ true += 1
551
+ acc = true / len(y_test)
552
552
 
553
553
 
554
- acc_list.append(acc)
555
- y_preds.append(PredictedOutput)
554
+ acc_list.append(acc)
555
+ y_preds.append(PredictedOutput)
556
+
557
+ if bar_status == True:
558
+ test_progress.update(1)
559
+ if inpIndex == 0:
560
+ acc_bar.update(acc)
561
+
562
+ else:
563
+ acc = acc - acc_list[inpIndex - 1]
564
+ acc_bar.update(acc)
565
+
566
+ if show_metrices == True:
567
+ plot_evaluate(x_test, y_test, y_preds, acc_list)
556
568
 
557
- if bar_status == True:
558
- test_progress.update(1)
559
- if inpIndex == 0:
560
- acc_bar.update(acc)
561
-
562
- else:
563
- acc = acc - acc_list[inpIndex - 1]
564
- acc_bar.update(acc)
565
569
 
566
- if show_metrices == True:
567
- plot_evaluate(x_test, y_test, y_preds, acc_list)
568
-
569
-
570
- for i, w in enumerate(Wc):
571
- W[i] = np.copy(w)
572
-
573
- #except:
570
+ for i, w in enumerate(Wc):
571
+ W[i] = np.copy(w)
572
+
573
+ except:
574
574
 
575
- #print(Fore.RED + 'ERROR:' + infoTestModel + Style.RESET_ALL)
575
+ print(Fore.RED + 'ERROR:' + infoTestModel + Style.RESET_ALL)
576
576
 
577
577
  return W, y_preds, acc
578
578
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyerualjetwork
3
- Version: 2.8.2
3
+ Version: 2.8.3
4
4
  Summary: plot_decision_boundry function added
5
5
  Home-page: UNKNOWN
6
6
  Author: Hasan Can Beydili
@@ -0,0 +1,6 @@
1
+ plan/__init__.py,sha256=SLgk4uuvhVr3CjscpcqN2TQMGyAd4Pe8YBiXfl3brd8,525
2
+ plan/plan.py,sha256=dh4sqKyS_KKw-bfsZb1EqfP5YeSvwbCNb0SC6Iz9ZTo,56255
3
+ pyerualjetwork-2.8.3.dist-info/METADATA,sha256=Yqg_Kxv3Y1cdJNWnbUz8OUSJGZqNIBzoQZvdysA5fYg,331
4
+ pyerualjetwork-2.8.3.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
5
+ pyerualjetwork-2.8.3.dist-info/top_level.txt,sha256=G0Al3HuNJ88434XneyDtRKAIUaLCizOFYFYNhd7e2OM,5
6
+ pyerualjetwork-2.8.3.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- plan/__init__.py,sha256=SLgk4uuvhVr3CjscpcqN2TQMGyAd4Pe8YBiXfl3brd8,525
2
- plan/plan.py,sha256=DUNmfjy81eQBB2gtQDLxOpTio7d8i5-H3VbietxVO-Y,56026
3
- pyerualjetwork-2.8.2.dist-info/METADATA,sha256=YuQspdVsLubSt0LaA5vLv_tzp7Q7WzjOcvWtzK4YtP4,331
4
- pyerualjetwork-2.8.2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
5
- pyerualjetwork-2.8.2.dist-info/top_level.txt,sha256=G0Al3HuNJ88434XneyDtRKAIUaLCizOFYFYNhd7e2OM,5
6
- pyerualjetwork-2.8.2.dist-info/RECORD,,