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

hi,I want to test a dataset with 200 classes,but get a error #37

Closed
weveng opened this issue Aug 9, 2022 · 6 comments
Closed

hi,I want to test a dataset with 200 classes,but get a error #37

weveng opened this issue Aug 9, 2022 · 6 comments

Comments

@weveng
Copy link

weveng commented Aug 9, 2022

No description provided.

@weveng
Copy link
Author

weveng commented Aug 9, 2022

RuntimeError: The expanded size of the tensor (1024) must match the existing size (512) at non-singleton dimension 1. Target sizes: [1, 1024]. Tensor sizes: [1, 512]

@weveng
Copy link
Author

weveng commented Aug 9, 2022

i want to know if the model can test the dataset with 200 classes

@xugy16
Copy link

xugy16 commented Aug 17, 2022

I think the default max class number is 80

@Haotian-Zhang
Copy link
Collaborator

Haotian-Zhang commented Sep 4, 2022

@weveng @xugy16 There is actually no "max class" concept in GLIP since it is an open-vocabulary contextualized object grounding method. Please just make sure that after converting 200 classes into one detection prompt, it will not exceed the maximum length of the input for the text encoder. If the prompt exceeds the length, you can take a look at the inference codes about how we deal with the LVIS dataset (~1200 classes).

@weinman
Copy link

weinman commented Sep 12, 2022

@Haotian-Zhang Thank you for this tip!

I see from the paper that the prompt is split up for training (Appendix B, "When not all object categories can fit into a single prompt") and evaluation (Appendix C.2).

This makes a lot of sense.

Unfortunately, I cannot find the relevant routines in the code. I wonder if someone can more specifically refer us to where should @weveng and I be looking for the implementation of these splits/accumulations for training and testing?

@small-code-cat
Copy link

@Haotian-Zhang Thank you for this tip!

I see from the paper that the prompt is split up for training (Appendix B, "When not all object categories can fit into a single prompt") and evaluation (Appendix C.2).

This makes a lot of sense.

Unfortunately, I cannot find the relevant routines in the code. I wonder if someone can more specifically refer us to where should @weveng and I be looking for the implementation of these splits/accumulations for training and testing?

I haven't found the corresponding code either. Can you find a way to handle situations where the prompt length is too long?

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

5 participants