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

train error #110

Open
Youggie opened this issue Dec 8, 2019 · 5 comments
Open

train error #110

Youggie opened this issue Dec 8, 2019 · 5 comments

Comments

@Youggie
Copy link

Youggie commented Dec 8, 2019

Traceback (most recent call last):
File "/usr/lib/pycharm-community/helpers/pydev/pydevd.py", line 1596, in
globals = debugger.run(setup['file'], None, None, is_module)
File "/usr/lib/pycharm-community/helpers/pydev/pydevd.py", line 974, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/usr/lib/pycharm-community/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/disk2/syj/code/M2Det/train.py", line 98, in
loss_l, loss_c = criterion(out, priors, targets)
File "/disk2/syj/anaconda2/envs/M2/lib/python3.7/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/disk2/syj/code/M2Det/layers/modules/multibox_loss.py", line 108, in forward
loss_c = F.cross_entropy(conf_p, targets_weighted, reduction='sum')
File "/disk2/syj/anaconda2/envs/M2/lib/python3.7/site-packages/torch/nn/functional.py", line 1551, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File "/disk2/syj/anaconda2/envs/M2/lib/python3.7/site-packages/torch/nn/functional.py", line 975, in log_softmax
return input.log_softmax(dim)
RuntimeError: Dimension out of range (expected to be in range of [-1, 0], but got 1)

@weqvr
Copy link

weqvr commented Dec 9, 2019

i meet the same problem . your torch vision is ?

@weqvr
Copy link

weqvr commented Dec 9, 2019

I resolve this problem by changing the torchvison to 1.3.

@TianshengSun
Copy link

@weqvr do you mean update torch from 0.4 to 1.3?

@Willert98
Copy link

meet the same problem +1

@idnihai
Copy link

idnihai commented Jul 15, 2021

meet the problem

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