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

RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1 #99

Closed
bkowshik opened this issue Aug 8, 2018 · 1 comment

Comments

@bkowshik
Copy link
Contributor

bkowshik commented Aug 8, 2018

On the master branch, I am running the rs predict step which is failing with the following error:

Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/app/robosat/robosat/tools/__main__.py", line 57, in <module>
    args.func(args)
  File "/app/robosat/robosat/tools/predict.py", line 82, in main
    outputs = net(images)
  File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 491, in __call__
    result = self.forward(*input, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/torch/nn/parallel/data_parallel.py", line 112, in forward
    return self.module(*inputs[0], **kwargs[0])
  File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 491, in __call__
    result = self.forward(*input, **kwargs)
  File "/app/robosat/robosat/unet.py", line 132, in forward
    dec0 = self.dec0(torch.cat([enc4, center], dim=1))
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 16 and 17 in dimension 2 at /pytorch/aten/src/THC/generic/THCTensorMath.cu:111
@bkowshik
Copy link
Contributor Author

bkowshik commented Aug 8, 2018

Thank you for the explanation here @daniel-j-h Things work with batch_size=32

@bkowshik bkowshik closed this as completed Aug 8, 2018
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

1 participant