Skip to content

This repo is about federated learning implementation using FLOWER framework for beginners.

Notifications You must be signed in to change notification settings

sharma-anee/Federated_Learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Federated_Learning implementaion using Flower(1.0.0).

This implementation is for beginners using the Flower framework. Here, the MNIST dataset and a simple Deep Learning framework is used. The scenario in here includes a server and two clients. Each client having different distribution of data (Non-IID data). FedAvg algorithm is used as the aggregation method on the server side.

Clone this repo using : git clone https://github.com/sharma-anee/Federated_Learning.git or else copy these codes into your own python editor and save into three seperate files as named here.

Steps to execute these codes:

  1. Open the command prompt, move into the exact directories wherever your files are and execute the server.py file using : python server.py.
  2. Open another command prompt (a new one), and execute the client1.py file using : python client1.py.
  3. Repeat the Step 2. using : python client2.py.
  4. Close the graphs generated by step 2 and step 3.
  5. You shall see the training and updated model parameters in each of the server and client command prompts window.

server_output

client1_output

client2_output

Note: Make sure you have a stable internet connection.

To understand how it actually works and basics of the mechanism, one must go through https://flower.dev/docs/.

Releases

No releases published

Packages

No packages published

Languages