This is the code for the paper [Novel clustered federated learning based on local loss] (to add link).
The code is based on a simulation framework for federated learning fl-sim.
To install requirements:
pip install -r requirements.txt
One can use the code in a Jupyter notebook or in command line as follows:
fl-sim configs/lcfl-rot-mnist.yml
or run in background using:
mkdir -p .logs
nohup fl-sim configs/lcfl-rot-mnist.yml > .logs/lcfl-rot-mnist.log 2>&1 & echo $! > .logs/lcfl-rot-mnist.pid
One can use the Panel
widget to inspect the results in a Jupyter notebook:
%load_ext autoreload
%autoreload 2
from fl_sim.utils.viz import Panel
panel = Panel()
ALL experiments were repeated 5 times with different random seeds.
1200 clients - ACC | 1200 clients - loss |
---|---|
2400 clients - ACC | 2400 clients - loss |
dynamic transforms - ACC | dynamic transforms - loss |
---|---|
no transforms - ACC | no transforms - loss |
FEMNIST | RotatedMNIST |
---|---|