CharlieDinh / pFedMe

Personalized Federated Learning with Moreau Envelopes (pFedMe) using Pytorch (NeurIPS 2020)
289 stars 89 forks source link

A question about train_one_step() method. #4

Closed sshpark closed 3 years ago

sshpark commented 3 years ago

https://github.com/CharlieDinh/pFedMe/blob/96863e05e799fb6ad23248c63824b0381d2bec11/FLAlgorithms/users/userperavg.py#L66 Hi CharlieDinh, I' m Sorry to take up your time. Can you tell me why self.get_next_test_batch() is used to do the update in the first step and then self.get_next_train_batch() is used to do the update in the second step? Can I do both updates with self.get_next_train_batch() ?

hesetone commented 3 years ago

https://github.com/CharlieDinh/pFedMe/blob/96863e05e799fb6ad23248c63824b0381d2bec11/FLAlgorithms/users/userperavg.py#L66

Hi CharlieDinh, I' m Sorry to take up your time. Can you tell me why self.get_next_test_batch() is used to do the update in the first step and then self.get_next_train_batch() is used to do the update in the second step? Can I do both updates with self.get_next_train_batch() ?

se se fa dou, orz, ......

CharlieDinh commented 3 years ago

Hi Sshpark, Sorry for the late reply. I've seen your comment yet. Actually, PerFedAvg requires a one-step update using the test data. So both should be get_next_test_batch. I updated the code.

sshpark commented 3 years ago

Hi Sshpark, Sorry for the late reply. I've seen your comment yet. Actually, PerFedAvg �requires a one-step update using the test data. So both should be get_next_test_batch. I updated the code.

Thank you very much for your answer!