You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code for the paper "Continual Federated Learning Based on Knowledge Distillation"
Requirements
python 3.7+
cuda 9.0+
pytorch 1.7+
Datasets
In the code, we use 0~8 to denote the catagories in text classification tasks: Finance(0), Entertainment(1), Education(2), Fashion(3), Stock(4), Technology(5), Home(6), Sports(7), Social(8).
There is only the Sina2019 dataset which is generated by ourselves in the ./dataset folder.
Limited by the maximium size of uploaded files, only the subsets of the original dataset are included under the path ./dataset .
To reproduce the work, you need to download the complete datasets:
To construct the required tasks, we provide some tools in construct_tasks.py.
Usage
Run the code like this:
python3 federated_run.py --model=TextCNN --paradigm=CFeD --scenario=class-IL
,where the parameter paradigm denotes which method is choosen and scenario.
Limited by the maximum size of the uploaded file, we decrease the hyper-parameters, like batch_size. To change the hyper-parameters, you can modify the specific model files under ./model, like ./model/TextCNN.py.