Skip to content

This is a implemention of FedAvg in paper Communication-Efficient Learning of Deep Networks from Decentralized Data.

Notifications You must be signed in to change notification settings

CatLoveFishma/FedAvg

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

FedAvg

This is a implemention of FedAvg in paper Communication-Efficient Learning of Deep Networks from Decentralized Data.

How to run the codes?

At first, you should creat two dirs called 'logs' and 'checkpoints', then you can cd into 'src', and run FedAvg on iid cifar10 and mnist

python3 federated_main.py --model=cnn --dataset=cifar --iid=1 --epochs=300 --lr=0.01 --local_ep=5 --local_bs=32

python3 federated_main.py --model=cnn --dataset=mnist --iid=1 --epochs=100 --lr=0.01 --local_ep=5 --local_bs=32

noniid cifar10 and mnist:

python3 federated_main.py --model=cnn --dataset=cifar --iid=0 --epochs=300 --lr=0.01 --local_ep=5 --local_bs=32

python3 federated_main.py --model=cnn --dataset=mnist --iid=0 --epochs=100 --lr=0.01 --local_ep=5 --local_bs=32

For best test acc:

- CIFAR10 MNIST
IID 68.70% 98.87%
Non-IID 68.11% 98.05%

test acc curve(for cifar10 both in iid and noniid setting):

企业微信截图_20210422101626

About

This is a implemention of FedAvg in paper Communication-Efficient Learning of Deep Networks from Decentralized Data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%