GithubHelp home page GithubHelp logo

fl_converge's Introduction

FL_Converge

We provide the code implementation for paper On the Convergence of Heterogeneous Federated Learning with Arbitrary Adaptive Online Model Pruning

The implementation is based opensource implementation of FedAvg

REQUIREMENTS

python>=3.6 pytorch>=0.4

Train on your own

Example to run weights Pruning on mnist iid

python main_fed_Pweight_AvgAll.py --dataset mnist --num_users 100 --frac 0.1 --num_channels 1 --model mlp --iid

For training with all settings including.

        [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
        [1, 1, 1, 1, 1, 1, 4, 4, 4, 4],
        [1, 1, 1, 1, 1, 4, 4, 4, 4, 7],
        [1, 1, 1, 1, 4, 4, 4, 4, 4, 4],
        [1, 1, 1, 1, 1, 1, 3, 4, 7, 7],
        [1, 1, 1, 1, 2, 2, 3, 3, 4, 4],
        [1, 1, 1, 1, 2, 3, 4, 4, 4, 4],
        [1, 1, 1, 1, 4, 4, 4, 4, 7, 7],
        [1, 1, 1, 1, 2, 3, 4, 5, 6, 7],
        [4, 4, 4, 4, 4, 4, 4, 4, 4, 4]
        [1, 1, 1, 1, 5, 5, 6, 6, 7, 7],
        [1, 1, 1, 4, 5, 5, 6, 6, 7, 7],
        [1, 2, 3, 4, 5, 5, 6, 6, 7, 7],
        [1, 4, 5, 5, 6, 6, 6, 7, 7, 7],
        [1, 4, 4, 4, 7, 7, 7, 7, 7, 7],
        [2, 2, 3, 3, 4, 4, 5, 6, 7, 7]

You may add, remove, or select partial of settings by modifying the setting_array.

Pretrained Results

Goto DemoData folder and run any notebook file.

You may need to change some imput names to generate other figures. Or read the csv file on your own.

Note: Under development. It can reproduce the results presented in the paper, however it is quite messy now and may not be suitable to be used as foundation for other works.

Note: The scripts will be slow without the implementation of parallel computing.

FLOPs Calculation

Use the notebook file in FLOPsCount file to calculate a model's FLOPs and memory usage.

Ackonwledgements

Acknowledgements give to shaoxiongji for the original FedAvg implementation.

fl_converge's People

Contributors

hanhananderson avatar

Stargazers

何云梦 avatar EnanaShinonome avatar  avatar zengzh avatar Lucky avatar  avatar zeyneddinoz avatar Duy Phuong Nguyen avatar

Watchers

James Cloos avatar  avatar

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.