Git Product home page Git Product logo

cfed's Introduction

Code for CFeD

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

  1. 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.
  • positional arguments:
    • model:{TextCNN, TextCNNMultihead, CNN_Cifar10, CNN_Cifar10_multihead, CNN_Cifar100}
    • paradigme:{CFeD, dmc, lwf, ewc, multihead, normal}
    • scenario:{domain, class}
  1. 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.

cfed's People

Contributors

lianziqt avatar

Stargazers

Nazreen Shah avatar  avatar ZJ WANG avatar Cola avatar  avatar sterzhang avatar  avatar  avatar Xiaofan Yu avatar Jihoon Moon avatar Colin Laganier avatar Gaurav Bagwe avatar Jie Zhang avatar FuXiao avatar Ray Sun avatar  avatar

Watchers

James Cloos avatar  avatar

cfed's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.