You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 272 and 270 in dimension 2 at /pytorch/aten/src/THC/generic/THCTensorMath.cu:71
#1
Open
wudrans opened this issue
Sep 8, 2020
· 0 comments
Traceback (most recent call last):
File "/home/wlj/softPakage/pycharm-community-2019.2/helpers/pydev/pydevd.py", line 2060, in
main()
File "/home/wlj/softPakage/pycharm-community-2019.2/helpers/pydev/pydevd.py", line 2054, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "/home/wlj/softPakage/pycharm-community-2019.2/helpers/pydev/pydevd.py", line 1405, in run
return self._exec(is_module, entry_point_fn, module_name, file, globals, locals)
File "/home/wlj/softPakage/pycharm-community-2019.2/helpers/pydev/pydevd.py", line 1412, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "/home/wlj/softPakage/pycharm-community-2019.2/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/wlj/work/download_master/csp_pytorch-master/test_one_pic_pedestrian.py", line 25, in
x_cls, x_reg, x_off = model(x)
File "/home/wlj/.virtualenvs/pytorch_virtualenv/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/home/wlj/work/download_master/csp_pytorch-master/models/cspnet.py", line 177, in forward
cat = torch.cat([p3up, p4up, p5up], dim=1)
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 272 and 270 in dimension 2 at /pytorch/aten/src/THC/generic/THCTensorMath.cu:71
Traceback (most recent call last):
File "/home/wlj/softPakage/pycharm-community-2019.2/helpers/pydev/pydevd.py", line 2060, in
main()
File "/home/wlj/softPakage/pycharm-community-2019.2/helpers/pydev/pydevd.py", line 2054, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "/home/wlj/softPakage/pycharm-community-2019.2/helpers/pydev/pydevd.py", line 1405, in run
return self._exec(is_module, entry_point_fn, module_name, file, globals, locals)
File "/home/wlj/softPakage/pycharm-community-2019.2/helpers/pydev/pydevd.py", line 1412, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "/home/wlj/softPakage/pycharm-community-2019.2/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/wlj/work/download_master/csp_pytorch-master/test_one_pic_pedestrian.py", line 25, in
x_cls, x_reg, x_off = model(x)
File "/home/wlj/.virtualenvs/pytorch_virtualenv/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/home/wlj/work/download_master/csp_pytorch-master/models/cspnet.py", line 177, in forward
cat = torch.cat([p3up, p4up, p5up], dim=1)
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 272 and 270 in dimension 2 at /pytorch/aten/src/THC/generic/THCTensorMath.cu:71
我直接运行test_caltech.py,会报错如上,torch.cat时,数据维度不一样,请问这该怎么解决呢
The text was updated successfully, but these errors were encountered: