CharlieDinh / pFedMe

Personalized Federated Learning with Moreau Envelopes (pFedMe) using Pytorch (NeurIPS 2020)
290 stars 88 forks source link

Cifar-10 running error #7

Closed Abdullatif2 closed 3 years ago

Abdullatif2 commented 3 years ago

When I use Cifar-10 and Netcifar model, it shows me the following error:

RuntimeError: Expected 4-dimensional input for 4-dimensional weight [16, 1, 2, 2], but got 3-dimensional input of size [1, 28, 28] instead.

CharlieDinh commented 3 years ago

Hi Abdullatif2,

I've just fixed it. Please try this command below:

python3 main.py --dataset Cifar10 --model cnn --batch_size 20 --learning_rate 0.01 --personal_learning_rate 0.01 --beta 1 --lamda 15 --num_global_iters 800 --local_epochs 20 --algorithm pFedMe --numusers 5

However, I haven't tested which are the best learning rate and lamda for cifar10.

Regards, Canh Dinh