# Federated Learning [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4321561.svg)](https://doi.org/10.5281/zenodo.4321561)
This is partly the reproduction of the paper of [Communication-Efficient Learning of Deep Networks from Decentralized Data](https://arxiv.org/abs/1602.05629)
Only experiments on MNIST and CIFAR10 (both IID and non-IID) is produced by far.
Note: The scripts will be slow without the implementation of parallel computing.
## Requirements
python>=3.6
pytorch>=0.4
## Run
The MLP and CNN models are produced by:
> python [main_nn.py](main_nn.py)
Federated learning with MLP and CNN is produced by:
> python [main_fed.py](main_fed.py)
See the arguments in [options.py](utils/options.py).
For example:
> python main_fed.py --dataset mnist --iid --num_channels 1 --model cnn --epochs 50 --gpu 0
`--all_clients` for averaging over all client models
NB: for CIFAR-10, `num_channels` must be 3.
## Results
### MNIST
Results are shown in Table 1 and Table 2, with the parameters C=0.1, B=10, E=5.
Table 1. results of 10 epochs training with the learning rate of 0.01
| Model | Acc. of IID | Acc. of Non-IID|
| ----- | ----- | ---- |
| FedAVG-MLP| 94.57% | 70.44% |
| FedAVG-CNN| 96.59% | 77.72% |
Table 2. results of 50 epochs training with the learning rate of 0.01
| Model | Acc. of IID | Acc. of Non-IID|
| ----- | ----- | ---- |
| FedAVG-MLP| 97.21% | 93.03% |
| FedAVG-CNN| 98.60% | 93.81% |
## Ackonwledgements
Acknowledgements give to [youkaichao](https://github.com/youkaichao).
## References
McMahan, Brendan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communication-Efficient Learning of Deep Networks from Decentralized Data. In Artificial Intelligence and Statistics (AISTATS), 2017.
## Cite As
Shaoxiong Ji. (2018, March 30). A PyTorch Implementation of Federated Learning. Zenodo. http://doi.org/10.5281/zenodo.4321561
没有合适的资源?快使用搜索试试~ 我知道了~
基于联邦学习的分心驾驶检测
共19个文件
py:11个
png:3个
txt:1个
0 下载量 150 浏览量
2024-08-08
15:11:18
上传
评论
收藏 95KB ZIP 举报
温馨提示
使用VGG19、efficientnet和Resnet50分别对驾驶员状态数据集进行分类,并在近期的工作中加入了联邦学习的方法,将Shapley值和激励机制引入到联邦学习过程中。
资源推荐
资源详情
资源评论
收起资源包目录
23aersadfsa1.zip (19个子文件)
23aersadfsa1
data
__init__.py 62B
LICENSE 1KB
save
fed_FL_dd_vgg_1000_C0.1_iidTrue.png 21KB
.gitkeep 0B
fed_FL_dd_vgg_100_C0.1_iidTrue.png 41KB
fed_mnist_cnn_50_C0.1_iidTrue.png 17KB
main_fed.py 12KB
utils
__init__.py 62B
options.py 3KB
sampling.py 2KB
nohup.out 56KB
requirements.txt 33B
models
__init__.py 62B
Fed.py 301B
Nets.py 665B
test.py 2KB
Update.py 4KB
Noise_data_generation.py 3KB
README.md 2KB
共 19 条
- 1
资源评论
程序猿小D
- 粉丝: 3045
- 资源: 118
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功