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

run problem #6

Open
qintaohu opened this issue Nov 24, 2018 · 1 comment
Open

run problem #6

qintaohu opened this issue Nov 24, 2018 · 1 comment

Comments

@qintaohu
Copy link

sorry, i cloned your code and ran test.py , but i got the problem

Finished loading model!
Testing image 1/4952....
/home/hqt/PycharmProjects/pytorch-ssd-master/ssd.py:101: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument.
self.softmax(conf.view(-1, self.num_classes)), # conf preds
Traceback (most recent call last):
File "/home/hqt/PycharmProjects/pytorch-ssd-master/test.py", line 91, in
thresh=args.visual_threshold)
File "/home/hqt/PycharmProjects/pytorch-ssd-master/test.py", line 52, in test_net
y = net(x) # forward pass
File "/home/hqt/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/hqt/PycharmProjects/pytorch-ssd-master/ssd.py", line 102, in forward
self.priors.type(type(x.data)) # default boxes
File "/home/hqt/PycharmProjects/pytorch-ssd-master/layers/functions/detection.py", line 61, in forward
ids, count = nms(boxes, scores, self.nms_thresh, self.top_k)
ValueError: not enough values to unpack (expected 2, got 0)

but i ran train.py ,i got this message:
File "/home/hqt/PycharmProjects/pytorch-ssd-master/train.py", line 257, in
train()
File "/home/hqt/PycharmProjects/pytorch-ssd-master/train.py", line 204, in train
loss_l, loss_c = criterion(out, targets)
File "/home/hqt/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/hqt/PycharmProjects/pytorch-ssd-master/layers/modules/multibox_loss.py", line 98, in forward
loss_c[pos] = 0 # filter out pos boxes for now
RuntimeError: The shape of the mask [16, 24564] at index 0 does not match the shape of the indexed tensor [393024, 1] at index 0

so ,could you help me solve this problem, thank you!

@d049
Copy link

d049 commented Dec 3, 2018

I think your pytorch-version is 0.4, please try 0.3

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