Traceback (most recent call last):
File "test_one_image.py", line 57, in
latend_id = model.netArc(img_id_downsample)
File "D:\Dev\Anaconda3\envs\simswap\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "E:\project\ai\SimSwap\models\models.py", line 145, in forward
x = self.fc(x)
File "D:\Dev\Anaconda3\envs\simswap\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "D:\Dev\Anaconda3\envs\simswap\lib\site-packages\torch\nn\modules\linear.py", line 94, in forward
return F.linear(input, self.weight, self.bias)
File "D:\Dev\Anaconda3\envs\simswap\lib\site-packages\torch\nn\functional.py", line 1753, in linear
return torch._C._nn.linear(input, weight, bias)
RuntimeError: mat1 dim 1 must match mat2 dim 0
Traceback (most recent call last):
File "test_one_image.py", line 57, in <module>
latend_id = model.netArc(img_id_downsample)
File "D:\Dev\Anaconda3\envs\simswap\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "E:\project\ai\SimSwap\models\models.py", line 145, in forward
x = self.fc(x)
File "D:\Dev\Anaconda3\envs\simswap\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "D:\Dev\Anaconda3\envs\simswap\lib\site-packages\torch\nn\modules\linear.py", line 94, in forward
return F.linear(input, self.weight, self.bias)
File "D:\Dev\Anaconda3\envs\simswap\lib\site-packages\torch\nn\functional.py", line 1753, in linear
return torch._C._nn.linear(input, weight, bias)
RuntimeError: mat1 dim 1 must match mat2 dim 0
It can be due to an error in the input size on the upstream of the netArc model, causing the matrix dimension mat1 and mat2 to be mismatched on the shown linear layer.
In this case, it can be that your "img_id_downsample" is not of correct shape. Or the original img_a is of size which is not divisible by 2. I have tested with images of size 224 and 256, maybe you can try to play around with your input size.
It can be due to an error in the input size on the upstream of the netArc model, causing the matrix dimension mat1 and mat2 to be mismatched on the shown linear layer.
In this case, it can be that your "img_id_downsample" is not of correct shape. Or the original img_a is of size which is not divisible by 2. I have tested with images of size 224 and 256, maybe you can try to play around with your input size.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Traceback (most recent call last):
File "test_one_image.py", line 57, in
latend_id = model.netArc(img_id_downsample)
File "D:\Dev\Anaconda3\envs\simswap\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "E:\project\ai\SimSwap\models\models.py", line 145, in forward
x = self.fc(x)
File "D:\Dev\Anaconda3\envs\simswap\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "D:\Dev\Anaconda3\envs\simswap\lib\site-packages\torch\nn\modules\linear.py", line 94, in forward
return F.linear(input, self.weight, self.bias)
File "D:\Dev\Anaconda3\envs\simswap\lib\site-packages\torch\nn\functional.py", line 1753, in linear
return torch._C._nn.linear(input, weight, bias)
RuntimeError: mat1 dim 1 must match mat2 dim 0
you can use test_whole_swapimage.py
It can be due to an error in the input size on the upstream of the netArc model, causing the matrix dimension mat1 and mat2 to be mismatched on the shown linear layer.
In this case, it can be that your "img_id_downsample" is not of correct shape. Or the original img_a is of size which is not divisible by 2. I have tested with images of size 224 and 256, maybe you can try to play around with your input size.