torch transforms - RandRicianNoise, StdShiftIntensity, RandStdShiftIntensity#2815
Conversation
…tensity Signed-off-by: Richard Brown <[email protected]>
|
@wyli I continue to be hampered by the FYI, |
Signed-off-by: Richard Brown <[email protected]>
for now perhaps in the new feature, we don't include any typing annotations, we can gradually add them later with non-breaking pull requests. |
|
/build |
Signed-off-by: Richard Brown <[email protected]>
monai/transforms/intensity/array.py
Outdated
|
|
||
| slices = (img != 0) if self.nonzero else ones(img.shape, dtype=bool) | ||
| if slices.any(): | ||
| out = deepcopy(img) |
There was a problem hiding this comment.
I think our transforms are in-place operation, no need to deepcopy?
There was a problem hiding this comment.
you're right, looks like a bug here, this astype will copy if the datatypes doesn't match, if that happens it's not an in-place operation
MONAI/monai/transforms/intensity/array.py
Line 283 in c39f6fa
|
@wyli temporarily using |
|
/build |
Signed-off-by: Richard Brown <[email protected]>
|
Thanks @Nic-Ma , updated for both those suggestions. |
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
|
/build |
Description
torch transforms - RandRicianNoise, StdShiftIntensity, RandStdShiftIntensity
Status
Ready
Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests.