Commit 83dcd35
Fix: correctly apply fftshift to real-valued data inputs (#8407)
Correctly apply fftshift to real-valued data inputs
Fixes # .
### Description
Correctly apply fftshift to real-valued data inputs. The last dimension
of output of torch.view_as_real has size 2 for both real-valued and
complex-valued input.
### 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`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.
---------
Signed-off-by: Puyang Wang <[email protected]>
Co-authored-by: YunLiu <[email protected]>1 parent 90ead4b commit 83dcd35
File tree
2 files changed
+13
-21
lines changed- monai/networks/blocks
- tests/data
2 files changed
+13
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
| 146 | + | |
153 | 147 | | |
154 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
155 | 151 | | |
156 | | - | |
| 152 | + | |
157 | 153 | | |
158 | 154 | | |
159 | 155 | | |
| |||
187 | 183 | | |
188 | 184 | | |
189 | 185 | | |
190 | | - | |
| 186 | + | |
191 | 187 | | |
192 | 188 | | |
193 | 189 | | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
| 190 | + | |
201 | 191 | | |
202 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
203 | 195 | | |
204 | | - | |
| 196 | + | |
205 | 197 | | |
206 | 198 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
0 commit comments