|
@@ -4,42 +4,42 @@
|
|
# Website on how to write bash script https://hackernoon.com/know-shell-scripting-202b2fbe03a8
|
|
# Website on how to write bash script https://hackernoon.com/know-shell-scripting-202b2fbe03a8
|
|
|
|
|
|
# Set GPU device
|
|
# Set GPU device
|
|
-GPU_ID="cuda:0"
|
|
|
|
|
|
+GPU_ID="cuda:1"
|
|
|
|
|
|
# ================ 32-bit ================
|
|
# ================ 32-bit ================
|
|
# This is for FL for 32-bit floating point
|
|
# This is for FL for 32-bit floating point
|
|
# IID
|
|
# IID
|
|
-python federated_main.py --local_ep=1 --local_bs=10 --frac=0.1 --model=mlp --dataset=mnist --iid=1 --gpu=1 --gpu_id=$GPU_ID --lr=0.01 --test_acc=95 --mlpdim=200 --epochs=200
|
|
|
|
|
|
+python federated_main.py --local_ep=1 --local_bs=10 --frac=0.1 --model=mlp --dataset=mnist --iid=1 --gpu=1 --lr=0.01 --test_acc=95 --mlpdim=200 --epochs=200
|
|
# NON-IID
|
|
# NON-IID
|
|
-python federated_main.py --local_ep=1 --local_bs=10 --frac=0.1 --model=mlp --dataset=mnist --iid=0 --gpu=1 --gpu_id=$GPU_ID --lr=0.1 --test_acc=95 --mlpdim=200 --epochs=300
|
|
|
|
|
|
+python federated_main.py --local_ep=1 --local_bs=10 --frac=0.1 --model=mlp --dataset=mnist --iid=0 --gpu=1 --lr=0.1 --test_acc=95 --mlpdim=200 --epochs=300
|
|
|
|
|
|
|
|
|
|
# This is for 2 clusters HFL for 32-bit floating point
|
|
# This is for 2 clusters HFL for 32-bit floating point
|
|
# IID
|
|
# IID
|
|
-python federated-hierarchical2_main.py --local_ep=1 --local_bs=10 --frac=0.1 --Cepochs=10 --model=mlp --dataset=mnist --iid=1 --num_cluster=2 --gpu=1 --gpu_id=$GPU_ID --lr=0.01 --mlpdim=200 --epochs=100
|
|
|
|
|
|
+python federated-hierarchical2_main.py --local_ep=1 --local_bs=10 --frac=0.1 --Cepochs=10 --model=mlp --dataset=mnist --iid=1 --num_cluster=2 --gpu=1 --lr=0.01 --mlpdim=200 --epochs=100
|
|
# NON-IID
|
|
# NON-IID
|
|
-python federated-hierarchical2_main.py --local_ep=1 --local_bs=10 --frac=0.1 --Cepochs=10 --model=mlp --dataset=mnist --iid=0 --num_cluster=2 --gpu=1 --gpu_id=$GPU_ID --lr=0.01 --mlpdim=200 --epochs=100
|
|
|
|
|
|
+python federated-hierarchical2_main.py --local_ep=1 --local_bs=10 --frac=0.1 --Cepochs=10 --model=mlp --dataset=mnist --iid=0 --num_cluster=2 --gpu=1 --lr=0.01 --mlpdim=200 --epochs=100
|
|
|
|
|
|
|
|
|
|
# This is for 4 clusters HFL for 32-bit floating point
|
|
# This is for 4 clusters HFL for 32-bit floating point
|
|
# IID
|
|
# IID
|
|
-python federated-hierarchical4_main.py --local_ep=1 --local_bs=10 --frac=0.1 --Cepochs=10 --model=mlp --dataset=mnist --iid=1 --gpu=1 --gpu_id=$GPU_ID --lr=0.01 --mlpdim=200 --epochs=100 --num_cluster=4
|
|
|
|
|
|
+python federated-hierarchical4_main.py --local_ep=1 --local_bs=10 --frac=0.1 --Cepochs=10 --model=mlp --dataset=mnist --iid=1 --gpu=1 --lr=0.01 --mlpdim=200 --epochs=100 --num_cluster=4
|
|
# NON-IID
|
|
# NON-IID
|
|
-python federated-hierarchical4_main.py --local_ep=1 --local_bs=10 --frac=0.1 --Cepochs=10 --model=mlp --dataset=mnist --iid=0 --gpu=1 --gpu_id=$GPU_ID --lr=0.01 --mlpdim=200 --epochs=150 --num_cluster=4
|
|
|
|
|
|
+python federated-hierarchical4_main.py --local_ep=1 --local_bs=10 --frac=0.1 --Cepochs=10 --model=mlp --dataset=mnist --iid=0 --gpu=1 --lr=0.01 --mlpdim=200 --epochs=150 --num_cluster=4
|
|
|
|
|
|
|
|
|
|
# This is for 8 clusters HFL for 32-bit floating point
|
|
# This is for 8 clusters HFL for 32-bit floating point
|
|
# IID
|
|
# IID
|
|
-python federated-hierarchical8_main.py --local_ep=1 --local_bs=10 --Cepochs=10 --model=mlp --dataset=mnist --iid=1 --gpu=1 --gpu_id=$GPU_ID --lr=0.01 --mlpdim=200 --epochs=30 --num_cluster=8 --test_acc=95
|
|
|
|
|
|
+python federated-hierarchical8_main.py --local_ep=1 --local_bs=10 --Cepochs=10 --model=mlp --dataset=mnist --iid=1 --gpu=1 --lr=0.01 --mlpdim=200 --epochs=30 --num_cluster=8 --test_acc=95
|
|
# NON-IID
|
|
# NON-IID
|
|
-python federated-hierarchical8_main.py --local_ep=1 --local_bs=10 --Cepochs=10 --model=mlp --dataset=mnist --iid=0 --gpu=1 --gpu_id=$GPU_ID --lr=0.01 --mlpdim=200 --epochs=30 --num_cluster=8 --test_acc=95
|
|
|
|
|
|
+python federated-hierarchical8_main.py --local_ep=1 --local_bs=10 --Cepochs=10 --model=mlp --dataset=mnist --iid=0 --gpu=1 --lr=0.01 --mlpdim=200 --epochs=30 --num_cluster=8 --test_acc=95
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ================ 16-bit ================
|
|
# ================ 16-bit ================
|
|
# This is the baseline without FL for 16-bit floating point.
|
|
# This is the baseline without FL for 16-bit floating point.
|
|
-python ./ybaseline_main_fp16.py --epochs=10 --model=mlp --dataset=mnist --num_classes=10 --gpu=1 --gpu_id=$GPU_ID | tee -a ../logs/terminaloutput_mnist_fp16_baseline.txt &
|
|
|
|
|
|
+python ./baseline_main_fp16.py --epochs=10 --model=mlp --dataset=mnist --num_classes=10 --gpu=1 --gpu_id=$GPU_ID | tee -a ../logs/terminaloutput_mnist_fp16_baseline.txt &
|
|
|
|
|
|
|
|
|
|
# This is for 1 cluster FL for 16-bit floating point
|
|
# This is for 1 cluster FL for 16-bit floating point
|