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

some question about model code #37

Open
mengfeiwu-ai opened this issue Sep 17, 2023 · 0 comments
Open

some question about model code #37

mengfeiwu-ai opened this issue Sep 17, 2023 · 0 comments

Comments

@mengfeiwu-ai
Copy link

mengfeiwu-ai commented Sep 17, 2023

作者您好,我想用你们的代码在我的数据集上进行训练和测试,但是我遇到了一些问题:
您在PluginMoodel中定义您的主要模型,在文件pim_module.py第330行有以下代码:
# get hidden feartues size
rand_in = torch.randn(1, 3, img_size, img_size)
outs = self.backbone(rand_in)
这个outs是一个tensor吧,但是后面用它作为字典进行查询,所以报了以下错误:
IndexError: tensors used as indices must be long, int, byte or bool tensors
另外FPN中也将outs作为字典操作,也报了这个错误。

@mengfeiwu-ai mengfeiwu-ai changed the title 代码提问 some question about model code Sep 17, 2023
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

1 participant