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

请问关于模型的"img_size"这个参数是什么呀?不需要和输入一样吗? #2

Open
GusRoth opened this issue Jan 28, 2021 · 3 comments

Comments

@GusRoth
Copy link

GusRoth commented Jan 28, 2021

我看到使用的实例中:
`from SETR.transformer_seg import SETRModel
import torch

if name == "main":
net = SETRModel(img_size=(32, 32),
in_channels=3,
out_channels=1,
hidden_size=1024,
num_hidden_layers=8,
num_attention_heads=16,
decode_features=[512, 256, 128, 64])
t1 = torch.rand(1, 3, 256, 256)
print("input: " + str(t1.shape))

# print(net)
print("output: " + str(net(t1).shape))`

SETRModel(img_size=(32, 32), 有这个,但是下面的输入使用的img_size是(256,256)。所以这个模型的img_size参数对应的是什么呀

@920232796
Copy link
Owner

分块的size。

@huixiancheng
Copy link

huixiancheng commented Jan 31, 2021

对于长宽不一样的输入图片 这个img_size要设成不一样的吗
比如输入图片是256x512 这个切片是要变成16x32吗 还是可以不变

@920232796
Copy link
Owner

都可以的~

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

3 participants