Closed tjuxiaofeng closed 3 years ago
Definitely, I got the same question as yours. I found that if I change NUM_LABELS(num_labels_per_users) into 2, then all users will share label 0&1, I think this is the key point that can't match non-iid scenario. Actually, I try to run this code with different models many times, however, it seems that FedAvg did better than pFedMe, I do doubt this cause my conundrum :(
I think the code "l = (user NUM_USERS + j) % 10" in line 39 should be modified to "l = (user NUM_LABELS + j) % 10". Using "user * NUM_USERS" will cause all users to share a data set with the same label, because *user NUM_USERS% 10 = 0.**