Skip to content

bariscamli/Centralized-Federated-Learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.