File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -101,8 +101,8 @@ def _is_tracing():
101101
102102def _is_cvcuda_available () -> bool :
103103 try :
104- import cvcuda
105- import nvcv
104+ import cvcuda # type: ignore[import-not-found]
105+ import nvcv # type: ignore[import-not-found]
106106 except ImportError :
107107 return False
108108 return True
Original file line number Diff line number Diff line change 11import warnings
22
33import numpy as np
4- import nvcv
4+ import nvcv # type: ignore[import-not-found]
5+ import cvcuda # type: ignore[import-not-found]
56import torch
67from torchvision .utils import _log_api_usage_once
78
@@ -200,8 +201,6 @@ def to_nvcv_tensor(pic, format=None):
200201 img_tensor = img_tensor .unsqueeze (0 ) # H W -> N H W
201202
202203 # Convert to NVCV tensor with NHWC layout
203- import cvcuda
204-
205204 return cvcuda .as_tensor (img_tensor .contiguous (), nvcv .TensorLayout .NHWC )
206205
207206
You can’t perform that action at this time.
0 commit comments