You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
I think it maybe a little problem around understanding overall execution process.
I follow instructions to prepare and run data on README file.
I am using the parameters:
export DATASET=mnist
export SEED=10
export K=5
export B=4
export NET=2nn
export T=5
export E=5
and receiving this result:
python3 main.py --dataset $DATASET --clients_per_round $K --num_round $T --num_epoch $E --batch_size $B --seed $SEED --model $NET --noaverage --noprint
>>> Arguments:
algo : fedavg4
batch_size : 4
clients_per_round : 5
dataset : mnist
device : 0
dis :
eval_every : 5
gpu : False
input_shape : 784
lr : 0.1
model : 2nn
noaverage : True
noprint : True
num_class : 10
num_epoch : 5
num_round : 5
seed : 10
wd : 0.001
>>> Read data from:
./data/mnist/data/train/all_data_0_equal_niid.pkl
./data/mnist/data/train/all_data_1_random_niid.pkl
./data/mnist/data/test/all_data_0_equal_niid.pkl
./data/mnist/data/test/all_data_1_random_niid.pkl
>>> Don not use gpu
>>> Model statistic per layer
TwoHiddenLayerFc(
198.8 KMac, 100.000% MACs,
(fc1): Linear(156.8 KMac, 78.873% MACs, in_features=784, out_features=200, bias=True)
(fc2): Linear(40.0 KMac, 20.121% MACs, in_features=200, out_features=200, bias=True)
(fc3): Linear(2.0 KMac, 1.006% MACs, in_features=200, out_features=10, bias=True)
)
>>> Activate a worker for training
>>> Initialize 100 clients in total
>>> Weigh updates by sample numbers
>>> Select 5 clients per round
Traceback (most recent call last):
File "/home/user/fedavgpy/main.py", line 131, in <module>
main()
File "/home/user/fedavgpy/main.py", line 127, in main
trainer.train()
File "/home/user/fedavgpy/src/trainers/fedavg4.py", line 35, in train
self.test_latest_model_on_traindata(round_i)
File "/home/user/fedavgpy/src/trainers/base.py", line 155, in test_latest_model_on_traindata
stats_from_train_data = self.local_test(use_eval_data=False)
File "/home/user/fedavgpy/src/trainers/base.py", line 211, in local_test
tot_correct, num_sample, loss = c.local_test(use_eval_data=use_eval_data)
File "/home/user/fedavgpy/src/models/client.py", line 89, in local_test
tot_correct, loss = self.worker.local_test(dataloader)
File "/home/user/fedavgpy/src/models/worker.py", line 131, in local_test
pred = self.model(x)
File "/home/user/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/home/user/fedavgpy/src/models/model.py", line 25, in forward
out = F.relu(self.fc1(x))
File "/home/user/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/torch/nn/modules/linear.py", line 114, in forward
return F.linear(input, self.weight, self.bias)
RuntimeError: mat1 and mat2 shapes cannot be multiplied (112x28 and 784x200)
The text was updated successfully, but these errors were encountered:
Hello!
I think it maybe a little problem around understanding overall execution process.
I follow instructions to prepare and run data on README file.
I am using the parameters:
export DATASET=mnist
export SEED=10
export K=5
export B=4
export NET=2nn
export T=5
export E=5
and receiving this result:
The text was updated successfully, but these errors were encountered: