I changed the loss value to nan after using the DPFedAvgAdaptive class
What is your question?
My Reproduction Code:
strategy = fl.server.strategy.FedAvg( fraction_fit=0.2, fraction_evaluate=0.2, min_fit_clients=2, min_evaluate_clients=2, min_available_clients=5, evaluate_fn=get_evaluate_fn(model, args.toy), on_fit_config_fn=fit_config, on_evaluate_config_fn=evaluate_config, initial_parameters=fl.common.ndarrays_to_parameters(model_parameters), ) strategy_adp = DPFedAvgAdaptive( strategy=strategy, num_sampled_clients=10, init_clip_norm=0.1, noise_multiplier=1.1, server_side_noising=True, clip_norm_lr=0.2, clip_norm_target_quantile=0.5, clip_count_stddev=None, ) strategy_dp_fixed = DPFedAvgFixed( strategy=strategy, num_sampled_clients=2, clip_norm=0.1 ) fl.server.start_server( server_address="0.0.0.0:8080", config=fl.server.ServerConfig(num_rounds=4), strategy=strategy_adp, )
And after four rounds of training, the result was like this:
INFO flwr 2023-09-11 23:34:26,374 | app.py:221 | app_fit: losses_centralized [(0, 722.7143316268921), (1, nan), (2, nan), (3, nan), (4, nan)] INFO flwr 2023-09-11 23:34:26,374 | app.py:222 | app_fit: metrics_centralized {'accuracy': [(0, 0.1314), (1, 0.0986), (2, 0.0986), (3, 0.0986), (4, 0.0986)]} Why did my loss value change to nan?
I am addressing this issue: https://github.com/adap/flower/pull/2782. Due to the fact that efficientnet is particularly sensitive to noise, it is recommended to use alexnet, imagenet-based models, or other alternatives for implementing differential privacy.
I have the same problem, is there a solution?
I have the same problem, is there a solution?
你别用他自带的那个模型,你换个模型就行了,比如alexnet或者resnet模型就没这个毛病
The model I chose is my own model that is there about time prediction and didn't use the one he comes with and still this problem occurs.
The model I chose is my own model that is there about time prediction and didn't use the one he comes with and still this problem occurs.
some models do have this problem. You can try a different Alexnet model first. If Alexnet does not have this problem but your model has it, then you need to consider processing your model
I solved this problem, I see your results, the accuracy is not updated for each round, what is this problem, I feel that his set_parameters function and get_parameters are not working, the test function's model parameters are not aggregated and updated
I solved this problem, I see your results, the accuracy is not updated for each round, what is this problem, I feel that his set_parameters function and get_parameters are not working, the test function's model parameters are not aggregated and updated
I have also solved this problem. My solution is to replace the model. How did you solve this problem?
Can we communicate by e-mail? This message communication is not too timely.Here's my email address: [email protected]