Do you need custom dynamic transformations? Most standard applications can just use:
https://pytorch.org/docs/stable/torchvision/transforms.html 16
the transforms above. I am working on some research regarding adversarial robustness that required custom transformations on the fly.
If you tell us your use case, we can point you in the right direction.