Skip to content

Commit ca91494

Browse files
authored
Fix empty descriptor (kornia#2927)
1 parent 51fdc33 commit ca91494

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kornia/feature/integrated.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def get_laf_descriptors(
5050
timg: Tensor = img
5151
if lafs.shape[1] == 0:
5252
warnings.warn(f"LAF contains no keypoints {lafs.shape}, returning empty tensor")
53-
return torch.empty(lafs.shape[0], lafs.shape[1], 128)
53+
return torch.empty(lafs.shape[0], lafs.shape[1], 128, dtype=lafs.dtype, device=lafs.device)
5454
if grayscale_descriptor and img.size(1) == 3:
5555
timg = rgb_to_grayscale(img)
5656

0 commit comments

Comments
 (0)