bariscamli / Centralized-Federated-Learning

Centralized Federated Learning using WebSockets and TensorFlow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Centralized Federated Learning

Federated learning is a distributed machine learning technique to train neural network models across edge devices with small amount of data; instead, training model in cloud or server with centralized, big data corpus. In this project, I implemented an application that clients can interact with a server to be part of federated learning. Server is responsible for receiving, sending, and aggregating neural network models. The clients are only assigned to training corresponding model with their local data. I used Centralized Federated Learning using WebSockets and TensorFlow. Lenet is preferred for computer vision model due to simplicity. CIFAR-10 and MNIST are used as dataset.

More details about implementation and test results can be found in the Project Report

Centralized Federated Learning

Setup

  • Install the dependencies:
pip install -r requirements.txt
  • Run a server
python server.py <number_of_requested_nodes> <number_of_communication_round> <name_of_dataset> <iid_or_non_iid> <balanced_or_unbalanced>
  • Run a client
python client.py <client_id> <number_of_local_epoch>

Demo

  • Server

  • Client

References

from Decentralized Data

  • MNIST Dataset taken from MNIST
  • CIFAR-10 Dataset taken from CIFAR10

License

This project is licensed under the terms of the Baris Camli License.

About

Centralized Federated Learning using WebSockets and TensorFlow

License:GNU General Public License v3.0


Languages

Language:Python 100.0%