Commit f239825
authored
SwinUNETR refactored img_size parameter and removed checkpointing dep… (#7093)
### Description
Make two changes for the SwinUNETR network:
- The image_size parameter does not seem to have an effect apart from
checking shape compatibility in the beginning. This is now expressed in
the docstring and the parameter will be deprecated in the future.
Instead the shape compatibility is checked during the forward pass on
the actual shape
- newer pytorch versions accept a parameter
[use_reentrant](https://pytorch.org/docs/2.1/checkpoint.html). The old
default of True is deprecated in favor of True. This PR sets the
parameter to true and therefore adopts the recommended value and removes
the warning.
### 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`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [x] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.
---------
Signed-off-by: John Zielke <john.zielke@snkeos.com>1 parent 100db27 commit f239825
2 files changed
Lines changed: 34 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
52 | 63 | | |
53 | 64 | | |
54 | 65 | | |
| |||
69 | 80 | | |
70 | 81 | | |
71 | 82 | | |
72 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
73 | 87 | | |
74 | 88 | | |
75 | 89 | | |
| |||
103 | 117 | | |
104 | 118 | | |
105 | 119 | | |
106 | | - | |
| 120 | + | |
107 | 121 | | |
108 | 122 | | |
109 | 123 | | |
110 | 124 | | |
111 | 125 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
| 126 | + | |
116 | 127 | | |
117 | 128 | | |
118 | 129 | | |
| |||
132 | 143 | | |
133 | 144 | | |
134 | 145 | | |
135 | | - | |
| 146 | + | |
136 | 147 | | |
137 | 148 | | |
138 | 149 | | |
| |||
297 | 308 | | |
298 | 309 | | |
299 | 310 | | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
300 | 322 | | |
| 323 | + | |
| 324 | + | |
301 | 325 | | |
302 | 326 | | |
303 | 327 | | |
| |||
669 | 693 | | |
670 | 694 | | |
671 | 695 | | |
672 | | - | |
| 696 | + | |
673 | 697 | | |
674 | 698 | | |
675 | 699 | | |
676 | 700 | | |
677 | | - | |
| 701 | + | |
678 | 702 | | |
679 | 703 | | |
680 | 704 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
| 264 | + | |
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| |||
0 commit comments