Federated-Learning-PyTorch icon indicating copy to clipboard operation
Federated-Learning-PyTorch copied to clipboard

there is something wrong in federated_main.py

Open Mr-lq7 opened this issue 3 years ago • 5 comments

微信截图_20220607111935 the code should be the change to the place marked in the red box

Mr-lq7 avatar Jun 07 '22 03:06 Mr-lq7

Sorry, it should be : for idx in idxs_users:

Mr-lq7 avatar Jun 07 '22 03:06 Mr-lq7

Agreed. Should be 'idx' instead of 'c'.

duchoang06 avatar Jun 30 '22 18:06 duchoang06

https://github.com/AshwinRJ/Federated-Learning-PyTorch/blob/26eaec40fa8beb56777feb89756f6401c28c4736/src/federated_main.py#L100C43-L100C72 the comment is "over all users at every epoch", I guess it should be c, and the idxs should be user_groups[c]

OuyangWenyu avatar Oct 03 '23 15:10 OuyangWenyu

Hi, To calculate the average training accuracy over all users (also known as the variable "idxs_users") participating in a training round, we should calculate the training accuracy of each user. We sum them up and divide the sum by the number of participants.

saigontrade88 avatar Oct 30 '23 16:10 saigontrade88

@Mr-lq7 If you are clear, please close this issue. Thanks.

saigontrade88 avatar Oct 30 '23 16:10 saigontrade88