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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: The size of tensor a (12828) must match the size of tensor b (3000) at non-singleton dimension 1 #192

Open
SJavad opened this issue Jul 5, 2023 · 3 comments

Comments

@SJavad
Copy link

SJavad commented Jul 5, 2023

Hi 馃枑
I Trained an SSD model with --resolution=640 and when I want to convert the .pth model to .onnx, it gives me an error:

    locations[..., :2] * center_variance * priors[..., 2:] + priors[..., :2],
RuntimeError: The size of tensor a (12828) must match the size of tensor b (3000) at non-singleton dimension 1

when I want to convert the model to 300*300 size, it is OK and converts successfully...
but when I set the --width=640 and --height=640, this error happened.

exported command:

Namespace(net='ssd-mobilenet', input='', output='', labels='labels.txt', width=640, height=640, batch_size=1, model_dir='.\\models\\GED\\')
=> running on device cuda:0
=> found best checkpoint with loss 2.568583369255066 (.\models\GED\mb1-ssd-Epoch-6-Loss-2.568583369255066.pth)
creating network:  ssd-mobilenet
num classes:       3
=> loading checkpoint:  .\models\GED\mb1-ssd-Epoch-6-Loss-2.568583369255066.pth
=> exporting model to ONNX...
@SJavad
Copy link
Author

SJavad commented Jul 7, 2023

A LOT of open issues and... 馃く
no answer...
Hmmm 馃
Interesting... 馃

@Zalways
Copy link

Zalways commented Aug 9, 2023

hey锛乮 met the same problem with you! have you solved this problem?looking forward to your reply!

@SJavad
Copy link
Author

SJavad commented Aug 10, 2023

hey锛乮 met the same problem with you! have you solved this problem?looking forward to your reply!

@Zalways
Hi
I Talk with dusty-nv and get say, pull again the repository (in dusty-nv) repo to solve this problem
seems that is the bug and solved

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