I don’t think this is supported in torchvision transformations, as literals are expected and tensor inputs would raise an error.
However, Kornia 3 is a differentiable computer vision library and might be helpful. 
CC @edgarriba as the core dev