Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

黑白单通道照片报错:维度出错 #7

Closed
wikithink opened this issue Dec 16, 2021 · 1 comment
Closed

黑白单通道照片报错:维度出错 #7

wikithink opened this issue Dec 16, 2021 · 1 comment

Comments

@wikithink
Copy link

light_cnns ==0.4.2

from light_cnns import parnet_s
model = parnet_s(1, 12)
model.eval()
print(model)
input = torch.randn(1, 1, 12, 5000) # 1张高12宽5000分辨率的黑白单通道照片
y = model(input)
print(y.size())

运行报错:
RuntimeError: The size of tensor a (312) must match the size of tensor b (313) at non-singleton dimension 3
x: torch.Size([1, 384, 1, 312])
y: torch.Size([1, 384, 1, 313])

a = x + y 这里报错

@murufeng
Copy link
Owner

您这属于维度不匹配,这个需要您根据代码在维度上做一些调整。目前支持分辨率图片高大于256,宽大于256.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants