陈东升-联邦学习脑肿瘤分类
 
Go to file
yin-kangning aa91a67fb8 first commit 2024-06-21 10:34:43 +08:00
data first commit 2024-06-21 10:34:43 +08:00
figures first commit 2024-06-21 10:34:43 +08:00
log first commit 2024-06-21 10:34:43 +08:00
utils first commit 2024-06-21 10:34:43 +08:00
.gitattributes first commit 2024-06-21 10:34:43 +08:00
.log first commit 2024-06-21 10:34:43 +08:00
README.md first commit 2024-06-21 10:34:43 +08:00
acc.png first commit 2024-06-21 10:34:43 +08:00
cbam.py first commit 2024-06-21 10:34:43 +08:00
client.py first commit 2024-06-21 10:34:43 +08:00
client1.py first commit 2024-06-21 10:34:43 +08:00
coatnet.py first commit 2024-06-21 10:34:43 +08:00
coordatt.py first commit 2024-06-21 10:34:43 +08:00
cwt_main.py first commit 2024-06-21 10:34:43 +08:00
datasets.py first commit 2024-06-21 10:34:43 +08:00
efficientnet_v2.py first commit 2024-06-21 10:34:43 +08:00
efn.py first commit 2024-06-21 10:34:43 +08:00
log.py first commit 2024-06-21 10:34:43 +08:00
main.py first commit 2024-06-21 10:34:43 +08:00
mbv2_ca.py first commit 2024-06-21 10:34:43 +08:00
models.py first commit 2024-06-21 10:34:43 +08:00
server.py first commit 2024-06-21 10:34:43 +08:00

README.md

代码运行

在本目录下,在命令行中执行下面的命令:

python main.py -c ./utils/conf.json
  • 联邦训练配置一共10台客户端设备no_models=10每一轮任意挑选其中的5台参与训练k=5 每一次本地训练迭代次数为3次local_epochs=3全局迭代次数为20次global_epochs=20

  • 集中式训练配置我们不需要单独编写集中式训练代码只需要修改联邦学习配置既可使其等价于集中式训练。具体来说我们将客户端设备no_models和每一轮挑选的参与训练设备数k都设为1即可。这样只有1台设备参与的联邦训练等价于集中式训练。其余参数配置信息与联邦学习训练一致。图中我们将局部迭代次数分别设置了123来进行比较。