Skip to content

Commit 98d7dfb

Browse files
committed
update is_cvcuda_tensor
1 parent c035df1 commit 98d7dfb

File tree

1 file changed

+3
-2
lines changed
  • torchvision/transforms/v2/functional

1 file changed

+3
-2
lines changed

torchvision/transforms/v2/functional/_utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ def is_cvcuda_tensor(inpt: Any) -> bool:
181181
Returns:
182182
True if the input is a CV-CUDA tensor, False otherwise.
183183
"""
184-
if _is_cvcuda_available():
184+
try:
185185
cvcuda = _import_cvcuda()
186186
return isinstance(inpt, cvcuda.Tensor)
187-
return False
187+
except ImportError:
188+
return False

0 commit comments

Comments
 (0)