ebagdasa / backdoors101

Backdoors Framework for Deep Learning and Federated Learning. A light-weight tool to conduct your research on backdoors.
MIT License
335 stars 82 forks source link

Questions about fl_task.update_global_model #21

Closed lisitian080516 closed 1 year ago

lisitian080516 commented 2 years ago

In the update_global_model function, I don't know What is the role of the variable of the 'model_weight'. I think it's not used. Could you tell me how is used? Thanks!

01312 commented 2 years ago

model_weight = global_model.state_dict()[name] \n model_weight.add_(average_update) ‘model weight’ actually is 'global_model.state_dict()[name]', you can update global_model by this function.

lisitian080516 commented 2 years ago

model_weight = global_model.state_dict()[name] \n model_weight.add_(average_update) ‘model weight’ actually is 'global_model.state_dict()[name]', you can update global_model by this function.

But changing this value of 'model_weight', where does it reflect that this value is passed back and updated?”

ebagdasa commented 1 year ago

I think it's updating the tensor of the model, let me know if it doesn't work