Skip to content

Commit

Permalink
Update experiments.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sjtudyq authored Aug 17, 2022
1 parent 5371adb commit 66095cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ def local_train_net_scaffold(nets, selected, global_model, c_nets, c_global, arg
logger.info("net %d final test acc %f" % (net_id, testacc))
avg_acc += testacc
for key in total_delta:
total_delta[key] /= len(selected)
total_delta[key] /= args.n_parties
c_global_para = c_global.state_dict()
for key in c_global_para:
if c_global_para[key].type() == 'torch.LongTensor':
Expand Down

0 comments on commit 66095cc

Please sign in to comment.