Kornia rotation not quite rotating as expected
I'm trying to use the kornia.geometry.transform.rotate function, in Python, to rotate a PyTorch tensor by arbitrary angles. However if I do a simple 90 degree rotation, the resulting tensor doesn't look like it's been fully rotated.

Here's some sample code:

import torch 
from kornia.geometry.transform import rotate
import matplotlib.pyplot as plt

a = torch.ones((1,64,64))
a[0,:,2] += 1

angle = torch.tensor([90])

c = rotate(a,angle)

plt.figure()
plt.subplot(121)
plt.imshow(a[0].detach().numpy())
plt.subplot(122)
plt.imshow(c[0].detach().numpy())


And the results before and after the rotation:



Am I missing a subtlety due to the tensor being too coarse here, which causes interpolation issues or something that would be alleviated with a much finer grained tensor?

Many thanks in advance!



Note I am using: 


python 3.6.10
kornia 0.2.0
pytorch 1.4.0


to use Kornia, you can use the Rotate class.
Below is an example to rotating all tensors in a mini-batch by a fixed 45 degrees:
import kornia as tgm

# set the rotation angles - assume batch size is N; 
angle = torch.tensor([45]*N).cuda()

# do the rotation:
tensor_rotated = tgm.Rotate(angle)(tensor_input)

The only caveat right now is that it seems super-slow..
Hope this helps!
