Skip to content

5712 update padding for torch 1.9#5718

Merged
wyli merged 2 commits intoProject-MONAI:devfrom
wyli:5712-padding
Dec 13, 2022
Merged

5712 update padding for torch 1.9#5718
wyli merged 2 commits intoProject-MONAI:devfrom
wyli:5712-padding

Conversation

@wyli
Copy link
Copy Markdown
Contributor

@wyli wyli commented Dec 13, 2022

Signed-off-by: Wenqi Li wenqil@nvidia.com

Fixes #5712

Description

>>> import torch
>>> img_t = torch.zeros(1, 1, 24, 24, 24); out = torch.nn.functional.pad(img_t[None], (20, 20, 20, 20, 20, 20), mode='reflect')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/conda/lib/python3.8/site-packages/torch/nn/functional.py", line 4189, in _pad
    raise NotImplementedError("Only 3D, 4D, 5D padding with non-constant padding are supported for now")
NotImplementedError: Only 3D, 4D, 5D padding with non-constant padding are supported for now

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@wyli wyli force-pushed the 5712-padding branch 2 times, most recently from 4c07d05 to c65445c Compare December 13, 2022 09:57
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Co-authored-by: Mingxin Zheng <mingxinz@nvidia.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
@wyli
Copy link
Copy Markdown
Contributor Author

wyli commented Dec 13, 2022

/build

@wyli wyli requested a review from mingxin-zheng December 13, 2022 10:50
@wyli wyli marked this pull request as ready for review December 13, 2022 10:50
@wyli wyli requested a review from Nic-Ma December 13, 2022 10:50
Copy link
Copy Markdown
Contributor

@mingxin-zheng mingxin-zheng left a comment

Choose a reason for hiding this comment

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

Tested with PyTorch Container 21.06 (PyTorch 1.90), and Auto3DSeg looks fine after the fix.

@wyli wyli enabled auto-merge (squash) December 13, 2022 11:06
@wyli wyli merged commit 75e02ba into Project-MONAI:dev Dec 13, 2022
@wyli wyli deleted the 5712-padding branch December 13, 2022 17:12
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.

test_auto3dseg_ensemble test error

3 participants