-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.py
36 lines (32 loc) · 895 Bytes
/
config.py
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
import torch
#device=torch.device('cuda:1' if torch.cuda.is_available() else 'cpu')
cuda_idx = torch.cuda.current_device()
device = torch.device("cuda:{}".format(cuda_idx))
AGGR_MEAN = 'mean'
AGGR_GEO_MED = 'geom_median'
AGGR_FOOLSGOLD ='foolsgold'
AGGR_KRUM = 'krum'
AGGR_TRIMMED_MEAN = 'trimmed_mean'
AGGR_BULYAN = 'bulyan'
AGGR_CRFL='crfl'
AGGR_FEDAVGLR='fedavglr'
AGGR_MEDIAN='median'
AGGR_MKRUM = 'mkrum'
AGGR_FLTRUST='fltrust'
AGGR_FEDLDP='fedldp'
AGGR_FEDCDP='fedcdp'
AGGR_DNC = 'dnc'
ATTACK_LIE='a little'
ATTACK_SYBIL='sybil attack'
ATTACK_SCBA='SCBA'
ATTACK_TAILOR='tailored attacks'
MAX_UPDATE_NORM = 1000 # reject all updates larger than this amount
patience_iter=20
TYPE_LOAN='loan'
TYPE_CIFAR100='cifar100'
TYPE_CIFAR='cifar'
TYPE_MNIST='mnist'
TYPE_TINYIMAGENET='tiny-imagenet-200'
TYPE_DDOS='ddos'
TYPE_REDDIT='reddit'
TYPE_FMNIST='fmnist'