-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.py
More file actions
41 lines (36 loc) · 794 Bytes
/
demo.py
File metadata and controls
41 lines (36 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from fllib.base import *
config = {
'dataset': {
'data_name': 'mnist',
'download': False,
'distribution_type': 'non_iid_dir',
'alpha': 0.5,
'simulated': True
},
'server': {
'rounds': 30,
'clients_per_round': 10,
'aggregation_rule': 'feddyn',
'aggregation_detail': {
'f': 2,
'm': 0.3,
'rho': 0.0005,
'b': 1,
'mu': 0.001,
'feddyn_alpha': 0.001
},
'model_name': 'LeNet5'
},
'client': {
'local_epoch': 2,
'batch_size': 50,
'optimizer':{
'type': 'SGD',
'lr': 0.01
}
},
'trial_name': 'test',
'resume': True
}
init(config=config)
run()