In TensorFlow, one can define shearing in x and y direction independently, such as:
image = tf.contrib.image.transform(image, [1., level, 0., 0., 1., 0., 0., 0.]) #x direction 
image = tf.contrib.image.transform(image, [1., 0., 0., level, 1., 0., 0., 0.]) #y direction

However, in Pytorch, there is only 1 option, such as:
import torchvision.transforms.functional as TF
image = TF.affine(image,degrees=0,translate=None,scale=None,shear=level)

How to do it appropriately with Pytorch? Thank you