pyerualjetwork 2.7.3__py3-none-any.whl → 2.7.4__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
@@ -496,69 +496,62 @@ def evaluate(
496
496
 
497
497
  layers = ['fex']
498
498
 
499
- try:
500
- Wc = [0] * len(W) # Wc = Weight copy
501
- true = 0
502
- y_preds = [-1] * len(y_test)
503
- acc_list = []
499
+ Wc = [0] * len(W) # Wc = Weight copy
500
+ true = 0
501
+ y_preds = [-1] * len(y_test)
502
+ acc_list = []
503
+
504
+ for i, w in enumerate(W):
505
+ Wc[i] = np.copy(w)
504
506
 
505
- for i, w in enumerate(W):
506
- Wc[i] = np.copy(w)
507
-
508
-
509
- if bar_status == True:
510
-
511
- test_progress = tqdm(total=len(x_test),leave=False, desc='Testing',ncols=120)
512
- acc_bar = tqdm(total=1, desc="Test Accuracy", ncols=120)
513
-
514
507
 
515
- for inpIndex, Input in enumerate(x_test):
516
- Input = np.array(Input)
517
- Input = Input.ravel()
518
- neural_layer = Input
519
-
520
- for index, Layer in enumerate(layers):
521
-
522
- neural_layer = normalization(neural_layer)
508
+ if bar_status == True:
523
509
 
524
- if Layer == 'fex':
525
- neural_layer = fex(neural_layer, W[index], False, None, activation_potentiation)
510
+ test_progress = tqdm(total=len(x_test),leave=False, desc='Testing',ncols=120)
511
+ acc_bar = tqdm(total=1, desc="Test Accuracy", ncols=120)
512
+
513
+
514
+ for inpIndex, Input in enumerate(x_test):
515
+ Input = np.array(Input)
516
+ Input = Input.ravel()
517
+ neural_layer = Input
526
518
 
519
+ for index, Layer in enumerate(layers):
527
520
 
528
- for i, w in enumerate(Wc):
529
- W[i] = np.copy(w)
530
- RealOutput = np.argmax(y_test[inpIndex])
531
- PredictedOutput = np.argmax(neural_layer)
532
- if RealOutput == PredictedOutput:
533
- true += 1
534
- acc = true / len(y_test)
521
+ neural_layer = normalization(neural_layer)
535
522
 
523
+ if Layer == 'fex':
524
+ neural_layer = fex(neural_layer, W[index], False, None, activation_potentiation)
536
525
 
537
- acc_list.append(acc)
538
- y_preds[inpIndex] = PredictedOutput
539
-
540
- if bar_status == True:
541
- test_progress.update(1)
542
- if inpIndex == 0:
543
- acc_bar.update(acc)
544
-
545
- else:
546
- acc = acc - acc_list[inpIndex - 1]
547
- acc_bar.update(acc)
548
526
 
549
- if show_metrices == True:
550
- plot_evaluate(y_test, y_preds, acc_list)
551
-
552
-
553
527
  for i, w in enumerate(Wc):
554
528
  W[i] = np.copy(w)
529
+ RealOutput = np.argmax(y_test[inpIndex])
530
+ PredictedOutput = np.argmax(neural_layer)
531
+ if RealOutput == PredictedOutput:
532
+ true += 1
533
+ acc = true / len(y_test)
555
534
 
556
- except:
557
535
 
558
- print(Fore.RED + "ERROR: Are you sure weights are loaded ? from: evaluate" +
559
- infoTestModel + Style.RESET_ALL)
560
- return 'e'
536
+ acc_list.append(acc)
537
+ y_preds[inpIndex] = PredictedOutput
538
+
539
+ if bar_status == True:
540
+ test_progress.update(1)
541
+ if inpIndex == 0:
542
+ acc_bar.update(acc)
543
+
544
+ else:
545
+ acc = acc - acc_list[inpIndex - 1]
546
+ acc_bar.update(acc)
547
+
548
+ if show_metrices == True:
549
+ plot_evaluate(y_test, y_preds, acc_list)
550
+
561
551
 
552
+ for i, w in enumerate(Wc):
553
+ W[i] = np.copy(w)
554
+
562
555
  return W, y_preds, acc
563
556
 
564
557
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyerualjetwork
3
- Version: 2.7.3
3
+ Version: 2.7.4
4
4
  Summary: Optimized for Vs Code
5
5
  Author: Hasan Can Beydili
6
6
  Author-email: tchasancan@gmail.com
@@ -0,0 +1,6 @@
1
+ plan/__init__.py,sha256=gmaz8lnQfl18MbOQwabBUPmShajK5S99jfyY-hQe8tc,502
2
+ plan/plan.py,sha256=t4Vghx1DcMYYzdzzdnd3G_fJobkJvNXVYMKAORJW8is,52772
3
+ pyerualjetwork-2.7.4.dist-info/METADATA,sha256=RJUQ5bKgoOSby1F9unDSKicejquxNMMZFRfdV1meZxY,248
4
+ pyerualjetwork-2.7.4.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
5
+ pyerualjetwork-2.7.4.dist-info/top_level.txt,sha256=G0Al3HuNJ88434XneyDtRKAIUaLCizOFYFYNhd7e2OM,5
6
+ pyerualjetwork-2.7.4.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- plan/__init__.py,sha256=gmaz8lnQfl18MbOQwabBUPmShajK5S99jfyY-hQe8tc,502
2
- plan/plan.py,sha256=hSAViAL5L1VddbK8k00DyNuhtkPcQDa0xntyAb86Ub0,53141
3
- pyerualjetwork-2.7.3.dist-info/METADATA,sha256=iAntLwxlS8RDFSn8fvuuVgeEf--nPbQ8W9_OkNwfdGw,248
4
- pyerualjetwork-2.7.3.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
5
- pyerualjetwork-2.7.3.dist-info/top_level.txt,sha256=G0Al3HuNJ88434XneyDtRKAIUaLCizOFYFYNhd7e2OM,5
6
- pyerualjetwork-2.7.3.dist-info/RECORD,,