zhuangdizhu / FedGen

Code and data accompanying the FedGen paper
233 stars 68 forks source link

Fix RuntimeError: Can't call numpy() on Tensor that requires grad #3

Closed XcrossD closed 2 years ago

XcrossD commented 2 years ago

Fixes https://github.com/zhuangdizhu/FedGen/issues/1

XcrossD commented 2 years ago

I encountered wrong tensor type errors when running python main.py --dataset Mnist-alpha0.1-ratio0.5 --algorithm FedGen --batch_size 32 --num_glob_iters 200 --local_epochs 20 --num_users 10 --lamda 1 --learning_rate 0.01 --model cnn --personal_learning_rate 0.01 --times 3 Not tested on other algorithms