MagFace icon indicating copy to clipboard operation
MagFace copied to clipboard

Error in training

Open rzamarefat opened this issue 2 years ago • 2 comments

Hi. Thank you for this awesome repo. In the inference mode I don't have any problem. But when it comes to training the architecture of the model has the following problem. RuntimeError: mat1 and mat2 shapes cannot be multiplied (2x100352 and 25088x512) This error happens in File "/home/marefat/projects/MagFace/run/../models/iresnet.py", line 145, in forward x = self.fc(x)

I tried to change the following: self.fc = nn.Linear(512 * block.expansion * self.fc_scale, num_classes) to fix this problem and match the dimensions. But after this I face core dump problem. Any recommendation will be appreciated.

rzamarefat avatar Nov 10 '22 07:11 rzamarefat

Hi, could you double-check your input dimension? The input should be of size 112x112 as stated in Sec. BasicTraining in ReadMe.

IrvingMeng avatar Nov 10 '22 12:11 IrvingMeng

That solved, thanks.

rzamarefat avatar Nov 11 '22 11:11 rzamarefat