Skip to content
Discussion options

You must be logged in to vote

Hi @jakubMitura14, thanks for your interest! If your custom transform is randomized, just inherit the Randomizable. The CacheDataset will cache the transform if the transform is not randomized.

MONAI/monai/data/dataset.py

Lines 842 to 845 in 9eb513a

for _transform in self.transform.transforms: # type:ignore
# execute all the deterministic transforms
if isinstance(_transform, Randomizable) or not isinstance(_transform, Transform):
break

Hope it can help you, thanks!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jakubMitura14
Comment options

Answer selected by jakubMitura14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants