I try to test the pre-trained model resnet18_110.pth in lfw dataset, and the test_batch_size = 16 . but i got a mismatch error in the 'resnet.py' like this:
Traceback (most recent call last):
File "test.py", line 171, in <module>
lfw_test(model, img_paths, identity_list, opt.lfw_test_list, opt.test_batch_size)
File "test.py", line 141, in lfw_test
features, cnt = get_featurs(model, img_paths, batch_size=batch_size)
File "test.py", line 65, in get_featurs
output = model(data)
File "/Users/zhangjiatao/anaconda3/envs/new_python/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
result = self.forward(*input, **kwargs)
File "/Users/zhangjiatao/anaconda3/envs/new_python/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 138, in forward
return self.module(*inputs, **kwargs)
File "/Users/zhangjiatao/anaconda3/envs/new_python/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
result = self.forward(*input, **kwargs)
File "/Users/zhangjiatao/Documents/MyProject/PingAn/arcface-pytorch/models/resnet.py", line 220, in forward
x = self.fc5(x)
File "/Users/zhangjiatao/anaconda3/envs/new_python/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
result = self.forward(*input, **kwargs)
File "/Users/zhangjiatao/anaconda3/envs/new_python/lib/python3.6/site-packages/torch/nn/modules/linear.py", line 67, in forward
return F.linear(input, self.weight, self.bias)
File "/Users/zhangjiatao/anaconda3/envs/new_python/lib/python3.6/site-packages/torch/nn/functional.py", line 1352, in linear
ret = torch.addmm(torch.jit._unwrap_optional(bias), input, weight.t())
RuntimeError: size mismatch, m1: [16 x 131072], m2: [32768 x 512] at /Users/administrator/nightlies/pytorch-1.0.0/wheel_build_dirs/conda_3.6/conda/conda-bld/pytorch_1544137972173/work/aten/src/TH/generic/THTensorMath.cpp:940
the error occur in x = self.fc5(x) in Class ResNetFace, do you have any idea?
I try to test the pre-trained model resnet18_110.pth in lfw dataset, and the test_batch_size = 16 . but i got a mismatch error in the 'resnet.py' like this:
the error occur in
x = self.fc5(x)
inClass ResNetFace
, do you have any idea?