wesleyjtann преди 4 години
родител
ревизия
2c64fdafff

BIN
save/MNIST_CNN_NONIID_acc.png


BIN
save/MNIST_CNN_NONIID_loss.png


BIN
save/objects/Old/FL_cifar_cnn_200_lr[0.01]_C[0.1]_iid[1]_E[5]_B[50].pkl


BIN
save/objects/[14]HFL4_mnist_cnn_100_lr[0.01]_C[0.1]_iid[0]_E[1]_B[10].pkl


BIN
save/objects/[20]FL_cifar_cnn_300_lr[0.01]_C[0.1]_iid[1]_E[5]_B[50].pkl


BIN
save/objects/[21]HFL2_cifar_cnn_100_lr[0.01]_C[0.1]_iid[1]_E[5]_B[50].pkl


BIN
save/objects/[22]HFL4_cifar_cnn_100_lr[0.01]_C[0.1]_iid[1]_E[5]_B[50].pkl


BIN
save/objects/[23]HFL8_cifar_cnn_100_lr[0.01]_C[0.1]_iid[1]_E[5]_B[50].pkl


Файловите разлики са ограничени, защото са твърде много
+ 22 - 10
src/.ipynb_checkpoints/Eval-checkpoint.ipynb


Файловите разлики са ограничени, защото са твърде много
+ 40 - 8
src/Eval.ipynb


BIN
src/__pycache__/models.cpython-37.pyc


+ 2 - 2
src/federated-hierarchical2_main.py

@@ -220,8 +220,8 @@ if __name__ == '__main__':
     # idx = np.random.randint(0,99)
 
     # for epoch in tqdm(range(args.epochs)):
-    # for epoch in range(args.epochs):
-    while testacc_check < args.test_acc or epoch < args.epochs:
+    for epoch in range(args.epochs):
+    # while testacc_check < args.test_acc or epoch < args.epochs:
     # while epoch < args.epochs: 
         local_weights, local_losses, local_accuracies= [], [], []
         print(f'\n | Global Training Round : {epoch+1} |\n')

+ 2 - 2
src/federated-hierarchical4_main.py

@@ -220,9 +220,9 @@ if __name__ == '__main__':
     idx = np.random.randint(0,99)
 
     # for epoch in tqdm(range(args.epochs)):
-    # for epoch in range(args.epochs):
+    for epoch in range(args.epochs):
     # while testacc_check < args.test_acc or epoch < args.epochs:
-    while epoch < args.epochs:        
+    # while epoch < args.epochs:        
         local_weights, local_losses, local_accuracies= [], [], []
         print(f'\n | Global Training Round : {epoch+1} |\n')
         

+ 2 - 2
src/federated-hierarchical8_main.py

@@ -258,8 +258,8 @@ if __name__ == '__main__':
     idx = np.random.randint(0,99)
 
     # for epoch in tqdm(range(args.epochs)):
-    # for epoch in range(args.epochs):
-    while testacc_check < args.test_acc or epoch < args.epochs:
+    for epoch in range(args.epochs):
+    # while testacc_check < args.test_acc or epoch < args.epochs:
     # while epoch < args.epochs:        
         local_weights, local_losses, local_accuracies= [], [], []
         print(f'\n | Global Training Round : {epoch+1} |\n')

+ 2 - 2
src/federated_main.py

@@ -80,8 +80,8 @@ if __name__ == '__main__':
     testacc_check, epoch = 0, 0 
 
     # for epoch in tqdm(range(args.epochs)):  # global training epochs
-    # for epoch in range(args.epochs):
-    while testacc_check < args.test_acc or epoch < args.epochs:
+    for epoch in range(args.epochs):
+    # while testacc_check < args.test_acc or epoch < args.epochs:
     # while testacc_check < args.test_acc:
         local_weights, local_losses = [], [] # init empty local weights and local losses
         print(f'\n | Global Training Round : {epoch+1} |\n') # starting with | Global Training Round : 1 |

+ 2 - 1
src/models.py

@@ -146,4 +146,5 @@ class CNNCifar(nn.Module):
         x = F.relu(self.fc1(x))
         x = F.relu(self.fc2(x))
         x = self.fc3(x)
-        return F.log_softmax(x, dim=1)
+        return F.log_softmax(x, dim=1)
+

Някои файлове не бяха показани, защото твърде много файлове са промени