-
|
Hi there! I was wondering if there is a way to make a RandomizableTransform depend on a previous RandomizableTransform during a training pipeline. During training, I would like to do something like:
I know I can override the randomize method in my transform, but I'm not sure how could I know if a previous transform in the Compose pipeline was applied. A workaround could be to implement a "composed Transform" RandomizableTransform_B_or_C, but I was wondering if someone has a better alternative. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
thanks for the discussion, does the MONAI/monai/transforms/compose.py Lines 385 to 388 in f140e06 |
Beta Was this translation helpful? Give feedback.
-
|
I think it does! Or at least it's definitely much cleaner :-) Thank you very much @wyli |
Beta Was this translation helpful? Give feedback.
thanks for the discussion, does the
OneOftransform as an extension ofComposesolve this problem?MONAI/monai/transforms/compose.py
Lines 385 to 388 in f140e06