IBM / federated-learning-lib

A library for federated learning (a distributed machine learning process) in an enterprise environment.
Other
499 stars 135 forks source link

How to run using fedplus with keras model? #121

Open omarelnakib opened 1 year ago

omarelnakib commented 1 year ago

Is there any way to allow the fedplus option for custom keras model ?

Yi-Zoey commented 1 year ago

Hi @omarelnakib, you can plug in your own Keras model in this line. For more details on how to write your own Keras model, you can use this tutorial.

omarelnakib commented 1 year ago

Hi @Yi-Zoey , Thank for your quick reply, I see, but the problem is fedPlus doesn't appear in the list during the experiment, I tried to add but face other issues, so if you could provide me steps to add it, I will be very grateful

omarelnakib commented 1 year ago

It keeps telling me generate_configs.py: error: argument --fusion/-f: invalid choice: 'fedplus' (choose from 'iter_avg', 'fedavg', 'coordinate_median', 'gradient_aggregation', 'krum', 'pfnm', 'zeno', 'fedprox', 'fedavgplus', 'differential_privacy_sgd', 'rl_cartpole', 'rl_pendulum', 'sklearn_logclassification_rw', 'spahm', 'sklearn_logclassification_globalrw', 'naive_bayes_dp', 'id3_dt', 'prej_remover', 'iter_avg_openshift', 'shuffle_iter_avg', 'coordinate_median_plus', 'geometric_median_plus', 'doc2vec', 'comparative_elimination')

Yi-Zoey commented 1 year ago

Hi @omarelnakib, I think there is a minor typo in our README, can you try changing to the following command to generate the configs? python examples/generate_configs.py -n <num_parties> -f fedavgplus -m tf -d <dataset> -p <path>