mspronesti / beta-federated

Federated Learning with flower and pytorch using a metaheuristic based on the beta distribution
MIT License
6 stars 0 forks source link

Error in cnn forwarding #1

Open GabrieleGioetto opened 2 years ago

GabrieleGioetto commented 2 years ago

https://github.com/mspronesti/federated/blob/2c6a579c7f7fe20a4bcf55bfc51b6be4f0655d9e/models/cnn.py#L38

There seems to be an issue with layers sizes

RuntimeError: mat1 and mat2 shapes cannot be multiplied (16x1600 and 1024x512) x = self.act(self.fc1(x)) File "/home/gabriele/Desktop/Malcom/Project/federated/venv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "/home/gabriele/Desktop/Malcom/Project/federated/venv/lib/python3.8/site-packages/torch/nn/modules/linear.py", line 103, in forward return F.linear(input, self.weight, self.bias)

mspronesti commented 2 years ago

I think this ain't related to CNN model per se, rather I wrote that model with MNIST in mind, not CIFAR10