Solved by user_123454321 in post #4 
              
              
                That function does not seem to have padding_mode, but one can instantiate a RandomAffine class to get the padding mode like this 
affine = kornia.augmentation.RandomAffine(degrees=0, translate=(0.3, 0.3), padding_mode='border')  
fig = plt.figure(figsize=(15, 15))
for i in range(4):
  for j in range…