File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
torchvision/transforms/v2/functional Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11from torchvision .transforms import InterpolationMode # usort: skip
22
3- from ._utils import is_pure_tensor , register_kernel , is_cvcuda_tensor # usort: skip
3+ from ._utils import is_pure_tensor , register_kernel # usort: skip
44
55from ._meta import (
66 clamp_bounding_boxes ,
Original file line number Diff line number Diff line change @@ -51,14 +51,14 @@ def get_dimensions_video(video: torch.Tensor) -> list[int]:
5151 return get_dimensions_image (video )
5252
5353
54- def _get_dimensions_cvcuda (image : "cvcuda.Tensor" ) -> list [int ]:
54+ def get_dimensions_image_cvcuda (image : "cvcuda.Tensor" ) -> list [int ]:
5555 # CV-CUDA tensor is always in NHWC layout
5656 # get_dimensions is CHW
5757 return [image .shape [3 ], image .shape [1 ], image .shape [2 ]]
5858
5959
6060if CVCUDA_AVAILABLE :
61- _register_kernel_internal (get_dimensions , cvcuda .Tensor )(_get_dimensions_cvcuda )
61+ _register_kernel_internal (get_dimensions , cvcuda .Tensor )(get_dimensions_image_cvcuda )
6262
6363
6464def get_num_channels (inpt : torch .Tensor ) -> int :
@@ -97,14 +97,14 @@ def get_num_channels_video(video: torch.Tensor) -> int:
9797get_image_num_channels = get_num_channels
9898
9999
100- def _get_num_channels_cvcuda (image : "cvcuda.Tensor" ) -> int :
100+ def get_num_channels_image_cvcuda (image : "cvcuda.Tensor" ) -> int :
101101 # CV-CUDA tensor is always in NHWC layout
102102 # get_num_channels is C
103103 return image .shape [3 ]
104104
105105
106106if CVCUDA_AVAILABLE :
107- _register_kernel_internal (get_num_channels , cvcuda .Tensor )(_get_num_channels_cvcuda )
107+ _register_kernel_internal (get_num_channels , cvcuda .Tensor )(get_num_channels_image_cvcuda )
108108
109109
110110def get_size (inpt : torch .Tensor ) -> list [int ]:
You can’t perform that action at this time.
0 commit comments