GithubHelp home page GithubHelp logo

frontop137 / adaptive-federated-learning Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ibm/adaptive-federated-learning

0.0 0.0 0.0 25 KB

Code for paper "Adaptive Federated Learning in Resource Constrained Edge Computing Systems"

License: MIT License

Python 100.00%

adaptive-federated-learning's Introduction

Adaptive Federated Learning in Resource Constrained Edge Computing Systems

This repository includes source code for the paper S. Wang, T. Tuor, T. Salonidis, K. K. Leung, C. Makaya, T. He, and K. Chan, "Adaptive federated learning in resource constrained edge computing systems," IEEE Journal on Selected Areas in Communications, vol. 37, no. 6, pp. 1205 โ€“ 1221, Jun. 2019.

Getting Started

The code runs on Python 3 with Tensorflow version 1 (>=1.13). To install the dependencies, run

pip3 install -r requirements.txt

Then, download the datasets manually and put them into the datasets folder.

To test the code:

  • Run server.py and wait until you see Waiting for incoming connections... in the console output.
  • Run 5 parallel instances of client.py on the same machine as the server.
  • You will see console outputs on both the server and clients indicating message exchanges. The code will run for a few minutes before finishing.
  • After the server and clients finish, run plot_multi_run.py which will plot the result. This figure will look similar to the SVM(SGD) subfigures in Fig. 4 of the paper (but with higher fluctuation).

Code Structure

All configuration options are given in config.py which also explains the different setups that the code can run with.

The results are saved as CSV files in the results folder. The CSV files should be deleted before starting a new round of experiment. Otherwise, the new results will be appended to the existing file.

Currently, the supported datasets are MNIST and CIFAR-10, and the supported models are SVM and CNN. The code can be extended to support other datasets and models too.

Citation

When using this code for scientific publications, please kindly cite the above paper.

Contributors

This code was written by Shiqiang Wang and Tiffany Tuor.

adaptive-federated-learning's People

Contributors

shiqiangw avatar stevemar 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.