Skip to content

Commit 4939355

Browse files
committed
resolve more formatting naming
1 parent e14e210 commit 4939355

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

torchvision/transforms/v2/functional/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from 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

55
from ._meta import (
66
clamp_bounding_boxes,

torchvision/transforms/v2/functional/_meta.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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

6060
if 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

6464
def get_num_channels(inpt: torch.Tensor) -> int:
@@ -97,14 +97,14 @@ def get_num_channels_video(video: torch.Tensor) -> int:
9797
get_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

106106
if 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

110110
def get_size(inpt: torch.Tensor) -> list[int]:

0 commit comments

Comments
 (0)