Git Product home page Git Product logo

fedk-ls's Introduction

Fedk-ls

The implementation of federated learning PyTorch respectively.

environment

PyTorch-version

1.Python 3.9.13

2.pytorch 1.3.1

both of them run on GPU

prepare data sets

You are supposed to prepare the data set by yourself. MNIST can be downloaded on http://yann.lecun.com/exdb/mnist/. These data sets should be put into /data/MNIST when the download is finished.

usage

Run the code

python server.py -nc 100 -cf 1 -E 5 -B 128  -mn mnist_2nn  -ncomm 50 -iid 0 -lr 0.001 -vf 1 -g 1 -dp 0.5 -op SGD -poipro 0.5 -revprob 0.5 -threshold 0.8 -repoi trainBehavior

which means there are 100 clients. The data set are allocated in Non-IID way. The epoch and batch size are set to 5 and 128. The learning rate is 0.01, we validate the codes every 20 rounds during the training, training stops after 50 rounds. There are three models to do experiments: mnist_2nn mnist_cnn and cifar_cnn, and we choose mnist_cnn in this command. Notice the data set path when run the code of pytorch-version(you can take the source code out of the 'use_pytorch' folder).

fedk-ls's People

Contributors

leftwithright avatar

Stargazers

 avatar

Watchers

 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.