Commit 75e02ba
5712 update padding for torch 1.9 (#5718)
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Fixes #5712
### Description
```py
>>> 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
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] 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`.
- [x] 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.
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Co-authored-by: Mingxin Zheng <mingxinz@nvidia.com>1 parent a604c15 commit 75e02ba
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
187 | 189 | | |
188 | 190 | | |
189 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
190 | 194 | | |
191 | 195 | | |
192 | 196 | | |
| |||
0 commit comments