Implementation of the paper No Fear of Heterogeneity: Classifier Calibration for Federated Learning with Non-IID Data
Run this repo:
-
Download the cifar10 dataset and save as images in the dir "./data/"
python data_process.py -
Run the main procedure:
python main.py -
Run t-SNE visualization:
python visualize.py [--model_before_calibration MODEL_BEFORE_CALIBRATION] [--model_after_calibration MODEL_AFTER_CALIBRATION] [--random_state RANDOM_STATE] [--save_path SAVE_PATH]Default arguments are:
MODEL_BEFORE_CALIBRATION:./save_model/model-epoch9.pthMODEL_AFTER_CALIBRATION:./save_model/model.pthRANDOM_STATE:1SAVE_PATH:./visualize/tsne.png