traincifar10_25clt_example.sh 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # The following commands provides an example on how to coduct training with different FL/pFL algorithms.
  2. # These commands assumes the dataset (in this case, cifar10 with 25 clients) has already been generated.
  3. # These commands train the model for 2 global rounds (-gr flag).
  4. # In each round 25% of the clients will be selected (-jr flag).
  5. # Each selected client will train the model for 2 epochs or local steps (-ls flag)
  6. # Local
  7. python main.py -data cifar10 -nc 25 -jr 0.25 -gr 2 -ls 2 -algo Local
  8. # FedAvg
  9. python main.py -data cifar10 -nc 25 -jr 0.25 -gr 2 -ls 2 -algo FedAvg
  10. # FedDyn
  11. python main.py -data cifar10 -nc 25 -jr 0.25 -gr 2 -ls 2 -algo FedDyn -al 0.1
  12. # pFedMe
  13. python main.py -data cifar10 -nc 25 -jr 0.25 -gr 2 -ls 2 -algo pFedMe -bt 1.0 -lrp 0.01
  14. # FedFomo
  15. python main.py -data cifar10 -nc 25 -jr 0.25 -gr 2 -ls 2 -algo FedFomo
  16. # APFL
  17. python main.py -data cifar10 -nc 25 -jr 0.25 -gr 2 -ls 2 -algo APFL -al 0.5
  18. # FedRep
  19. python main.py -data cifar10 -nc 25 -jr 0.25 -gr 2 -ls 2 -algo FedRep -pls 1
  20. # LGFedAvg
  21. python main.py -data cifar10 -nc 25 -jr 0.25 -gr 2 -ls 2 -algo LGFedAvg
  22. # FedPer
  23. python main.py -data cifar10 -nc 25 -jr 0.25 -gr 2 -ls 2 -algo FedPer
  24. # Per-FedAvg
  25. python main.py -data cifar10 -nc 25 -jr 0.25 -gr 2 -ls 2 -algo PerAvg -al 0.005 -bt 0.005
  26. # FedRoD
  27. python main.py -data cifar10 -nc 25 -jr 0.25 -gr 2 -ls 2 -algo FedRoD
  28. # FedBABU
  29. python main.py -data cifar10 -nc 25 -jr 0.25 -gr 2 -ls 2 -algo FedBABU -al 0.001 -bt 0.01
  30. # PGFed
  31. python main.py -data cifar10 -nc 25 -jr 0.25 -gr 2 -ls 2 -algo PGFed -mu 0.1 -lam 0.01 -bt 0.0
  32. # PGFedMo
  33. python main.py -data cifar10 -nc 25 -jr 0.25 -gr 2 -ls 2 -algo PGFed -mu 0.1 -lam 0.01 -bt 0.5