CharlieDinh / pFedMe

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

A question about train_one_step() method. #4

Closed sshpark closed 4 years ago

sshpark commented 4 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 4 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 4 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 4 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!