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

Error in inference on other size except (640,640) #7

Open
Yasin40 opened this issue Dec 15, 2020 · 3 comments
Open

Error in inference on other size except (640,640) #7

Yasin40 opened this issue Dec 15, 2020 · 3 comments

Comments

@Yasin40
Copy link

Yasin40 commented Dec 15, 2020

Hi,
I want inference my .torchscript.pt which is trained by this command and switch:

python train.py --img 128 128 --rect ...

but, by change resize function in this repo to (128,128), i got error:

RuntimeError: The size of tensor a (32) must match the size of tensor b (80) at non-singleton dimension 3

but, i don't know where should i change to work for me.
please help me.

@Nebula4869
Copy link
Owner

Bro, your error is obviously because there is a problem with the number of categories, and it has nothing to do with the image size. I used COCO to train 80 categories. Did you train a 32-category? Please do not come to me if there are any minor problems in the code, can it be solved by yourself?

@Yasin40
Copy link
Author

Yasin40 commented Dec 15, 2020

No, if this problem was relate to category, doesn't work by change to 640,640. Am i right?

@Nebula4869
Copy link
Owner

Nebula4869 commented Dec 15, 2020 via email

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