Affine transformation with different angles and translations

Hi, I have a batch of images of the form (Batch, Channels, Height, Width) and I would like to perform a batched affine transformation using different translations, angles (and possibly rotation centers) for each element in the batch. Thus, I would have translation and angle arrays with shape (Batch, 2) and (Batch) respectively.
However, it seems that the torchvision.transforms.functional.affine implementation only allows to use one value for the angle and translation, which acts on the full batch.
Is there any way I can perform this transformation in a batched way? Thanks in advance.