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.pth
MODEL_AFTER_CALIBRATION
:./save_model/model.pth
RANDOM_STATE
:1
SAVE_PATH
:./visualize/tsne.png