I don’t think this is true as I can specify a smaller stride as seen here:
x = torch.arange(5*5).view(1, 1, 5, 5)
patches = kornia.contrib.extract_tensor_patches(x, window_size=(3, 3), stride=(1, 1))
print(x)
# tensor([[[[ 0, 1, 2, 3, 4],
# [ 5, 6, 7, 8, 9],
# [10, 11, 12, 13, 14],
# [15, 16, 17, 18, 19],
# [20, 21, 22, 23, 24]]]])
print(patches)
# tensor([[[[[ 0, 1, 2],
# [ 5, 6, 7],
# [10, 11, 12]]],
# [[[ 1, 2, 3],
# [ 6, 7, 8],
# [11, 12, 13]]],
# [[[ 2, 3, 4],
# [ 7, 8, 9],
# [12, 13, 14]]],
# [[[ 5, 6, 7],
# [10, 11, 12],
# [15, 16, 17]]],
# [[[ 6, 7, 8],
# [11, 12, 13],
# [16, 17, 18]]],
# [[[ 7, 8, 9],
# [12, 13, 14],
# [17, 18, 19]]],
# [[[10, 11, 12],
# [15, 16, 17],
# [20, 21, 22]]],
# [[[11, 12, 13],
# [16, 17, 18],
# [21, 22, 23]]],
# [[[12, 13, 14],
# [17, 18, 19],
# [22, 23, 24]]]]])