Torchvision.transforms.functional Tensor Parameters

Hi! I would like to calculate the gradient of torchvision.transforms.functional transformation parameters. For example, I would like to use torchvision.transforms.functional.rotate and provide a tensor for the angle parameter so I can calculate the gradient of it. Is there any easy way of doing this in PyTorch right now?

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

2 Likes

Thank you, Kornia looks exactly like what I’ve been looking for!

1 Like