A demo of end-to-end federated learning system.
Federated learning gets a lot of attention recently, but the existing work is basically based on simulation testing, and there is no complete system for everyone to study. Therefore, we built an end-to-end cross-terminal federated learning system and tested it on 20 real Android devices(demo below). The code will be actively maintained and optimized, and hope it is useful for open source comunity.
- Install python3.6, pip3, and install the following dependency packages
pip3 install -U MNN
pip3 install cherrypy
pip3 install ws4py
- Run server.py
- The data and initialization model need to be downloaded to the local Android device through the command line tool adb
cd End2end-Federated-Learning/data
adb push mnist.snapshot.mnn /data/local/tmp/mnn/mnist.snapshot.mnn
adb push mnist_data /data/local/tmp/mnist_data
-
Modify the SERVER_URL in app/src/main/java/com/demo/MainActivity.java to the ip address of the your server
-
Connect the android device and run the project (must be in the same local area network as the server to run normally)
Prof. Mengwei Xu ([email protected]), Prof. Shangguang Wang ([email protected])