Closed Abhijit4-debug closed 1 year ago
I am getting dimensional error too on Digit5 dataset
mat1 and mat2 shapes cannot be multiplied (10x1600 and 10816x512)
This error usually occurs in the feed forward neural network layer at the end, probably if the input size in the flatten layer is wrong.
This error usually occurs in the feed forward neural network layer at the end, probably if the input size in the flatten layer is wrong.
Can you suggest a way to fix it ?
could you share your model architecture? and your image dimensional order?
Sorry for the delayed response. I have been quite busy recently
I used the above CNN in the local setup it ran without any error
Did you mean the Local
method in this platform?
Which FL method did you use? Can you print the dimension of the feature map in the model where this error occurs?
Hi I wanted to use this framework for the image dataset for which I preprocessed the images in dimensional order [Channels,width,Height] which is [3,150,150] and I am using the following CNN for classification,
class FedAvgCNN(nn.Module): def init(self, in_features=3, num_classes=4, dim=67500): super().init() self.conv1 = nn.Sequential( nn.Conv2d(3, 32, kernel_size=3, padding=1), nn.ReLU(), nn.Conv2d(32, 64, kernel_size=3, stride=1, padding=1), nn.ReLU(), nn.MaxPool2d(2, 2), # output: 64 x 16 x 16 )
When I used the above CNN in the local setup it ran without any errors but when i tried using in this framework I am getting the following dimensional error.
I understand the meaning of the error but I am not sure why it is occurring as I preprocessed the images correctly according to the CNN