-
Notifications
You must be signed in to change notification settings - Fork 534
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
runtime error mobillenet-ssd-v2 #183
Comments
From wath I can tell, of the two valiables ( # add this code in box_utils.py line: 104
print(locations.is_cuda)
print(priors.is_cuda)
---
False
True Therefore, the following code could be added for use # priors can have one dimension less.
if priors.dim() + 1 == locations.dim():
priors = priors.unsqueeze(0)
+ if priors.is_cuda:
+ priors = priors.to('cpu')
return torch.cat([
locations[..., :2] * center_variance * priors[..., 2:] + priors[..., :2],
torch.exp(locations[..., 2:] * size_variance) * priors[..., 2:]
], dim=locations.dim() - 1) |
https://github.com/qfgaohao/pytorch-ssd/blob/master/vision/ssd/ssd.py#L38
Another walkaway solution would be simply to run by
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello
I'm trying to use this repo to run live demo to use mobielnet-ssd-v2.
I tried to run
python run_ssd_live_demo.py mb2-ssd-lite models/mb2-ssd-lite-mp-0_686.pth models/voc-model-labels.txt
.I got this error as output
Environments
OS: Ubuntu 18.04
GPU: NVIDIA GeForce RTX 2070 SUPER
DRIVER: 515.65.01
CUDA: 11.6
Dependecies
torch==1.10.2
torchaudio==0.10.1
torchvision==0.11.2
opencv-python==4.6.0.66
The text was updated successfully, but these errors were encountered: