GithubHelp home page GithubHelp logo

fedmr's Introduction

FedMR

[TMLR 2023]Federated Learning under Partially Class-Disjoint Data via Manifold Reshaping

Dependencies

  • PyTorch >= 1.0.0
  • torchvision >= 0.2.1
  • scikit-learn >= 0.23.1

Data Preparing

Here we provide the implementation on SVHN, Cifar10 and Cifar100 datasets. The three datasets will be automatically downloaded in your datadir.

Model Structure

As for model used in the paper, we use the same model structure of SimpleCNN and ResNet18 modified for 32x32 input as MOON.

Parameters

Parameter Description
model The model architecture. Options: simple-cnn, resnet18.
dataset Dataset to use. Options: CIFAR10. CIFAR100, SVHN
lr Learning rate.
batch-size Batch size.
epochs Number of local epochs.
n_parties Number of parties.
party_per_round number of active clients in each round.
comm_round Number of communication rounds.
beta The concentration parameter of the Dirichlet distribution for non-IID partition. Setting 100000 as IID
datadir The path of the dataset.
logdir The path to store the logs.
seed The initial seed.
mu Param of baselines.

Usage

Here is an example to run FedGELA on CIFAR10 with ResNet18:

python FedMR.py --dataset=cifar10 \
    --partition='dirichlet' \
    --lr=0.01 \
    --epochs=10 \
    --model=resnet18 \
    --comm_round=100 \
    --n_parties=50 \
    --beta=0.5 \
    --party_per_round=10 \
    --logdir='./logs/' \
    --datadir='./data/' \
    --mu=0.00001 \

Acknowledgement

We borrow some codes from MOON and FedSkip.

Contact

If you have any problem with this code, please feel free to contact [email protected] or [email protected].

fedmr's People

Contributors

knight-fzq avatar

Stargazers

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