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

test image shape #33

Open
yjdzyr opened this issue Sep 21, 2024 · 1 comment
Open

test image shape #33

yjdzyr opened this issue Sep 21, 2024 · 1 comment

Comments

@yjdzyr
Copy link

yjdzyr commented Sep 21, 2024

作者,您好,非常感谢作者提供这个优秀的项目!但是我在使用预训练的权重测试自己的数据集的时候发现了前向反馈的张量会在Cat的时候有大小不匹配的问题,请问这样的问题如果修改呢?
以下为问题。
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 138 but got size 139 for tensor number 1 in the list.
我也尝试resize,但是发现resize后输出的结果,并不是正常的图像。
非常期待作者的回复!

@Fediory
Copy link
Owner

Fediory commented Sep 22, 2024

首先确保您的数据集图像是的长和宽都是8的倍数,因为我们有三次下采样。如果您的图像长宽不是8的倍数,那么请padding边缘到8的倍数后,再输入到我们的模型中,最后输出时,把多余的边缘裁切掉。

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