Skip to content

Conversation

@bkowshik
Copy link
Contributor

@bkowshik bkowshik commented Aug 9, 2018

With this fix, getting predictions with overlap % 32 != 0 will result in the following assertion.

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 120, in forward
    assert size[-1] % 32 == 0 and size[-2] % 32 == 0, "image resolution has to be divisible by 32 for resnet"
AssertionError: image resolution has to be divisible by 32 for resnet

@daniel-j-h how do you want to get a similar fix to #75

@bkowshik bkowshik requested a review from daniel-j-h August 9, 2018 17:02
Copy link
Collaborator

@daniel-j-h daniel-j-h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 looks good!

You can merge this into master, then checkout the branch for #75 and do the same there for the fpn (you can then also rebase against master).

@bkowshik bkowshik merged commit 495edfb into master Aug 10, 2018
@bkowshik bkowshik deleted the assert-resolution branch August 10, 2018 04:36
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

Successfully merging this pull request may close these issues.

2 participants