Skip to content

Commit d3e4573

Browse files
committed
update todtype based on PR reviews
1 parent 7a231b1 commit d3e4573

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

torchvision/transforms/v2/_misc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
get_bounding_boxes,
1818
get_keypoints,
1919
has_any,
20+
is_cvcuda_tensor,
2021
is_pure_tensor,
2122
)
2223

@@ -267,7 +268,7 @@ class ToDtype(Transform):
267268
Default: ``False``.
268269
"""
269270

270-
_transformed_types = (torch.Tensor,)
271+
_transformed_types = (torch.Tensor, is_cvcuda_tensor)
271272

272273
def __init__(
273274
self, dtype: Union[torch.dtype, dict[Union[type, str], Optional[torch.dtype]]], scale: bool = False

0 commit comments

Comments
 (0)