AI-secure / CRFL

CRFL: Certifiably Robust Federated Learning against Backdoor Attacks (ICML 2021)
69 stars 15 forks source link

Perform parameter smoothing #2

Open HengerLi opened 3 years ago

HengerLi commented 3 years ago

To perform parameter smoothing, the original smooth_mnist.py requires a default file 'saved_models/model_mnist_Feb.04_15.41.37/params.yaml', which the author may want to share for someone don't want train their own model. However, when I set the dir to a freshly training model, for example, training_param_fname= 'saved_models/model_mnist_Aug.16_20.42.53/params.yaml'. It leads to the following error: KeyError Traceback (most recent call last)

in () 178 helper.params['poison_delta']=training_params['poison_delta'] 179 helper.params['poison_pattern']=training_params['poison_pattern'] --> 180 helper.params['poison_label_swap']==training_params['poison_label_swap'] 181 helper.params['is_poison']==training_params['is_poison'] 182 helper.params['adversary_list']==training_params['adversary_list'] KeyError: 'poison_label_swap'
AlphaPav commented 2 years ago

Hi @HengerLi Sorry for the late reply. I just saw your issue. Please add the "poison_label_swap" key in the 'params.yaml' file. Thanks for reporting the issue and I will update the code soon.

miku8miku commented 9 months ago

==