@bnehoran Thanks for the detailed answer. Affine transform (The function in PyTorch) works nice for stuff like rotation, zoom in and zoom out. How is a skew operation, or an operation like image deformation, or a Piecewise affine Transform possible with F.affine_grid() ?
It seems that theta has too small dimensions in order to completely form the affine grid for something other than a rotation, or a zoom-in (which is probably its intended use) – which is why i resorted to directly computing the grid and applying the F.grid_sample() operation instead of going through the F.affine_grid() operation