Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add expected shapes in tvtensors docs #8262

Merged
merged 11 commits into from
Apr 19, 2024
2 changes: 1 addition & 1 deletion torchvision/tv_tensors/_bounding_boxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class BoundingBoxFormat(Enum):


class BoundingBoxes(TVTensor):
""":class:`torch.Tensor` subclass for bounding boxes.
""":class:`torch.Tensor` subclass for bounding boxes with shape ``[N, 4]``.

.. note::
There should be only one :class:`~torchvision.tv_tensors.BoundingBoxes`
Expand Down
2 changes: 1 addition & 1 deletion torchvision/tv_tensors/_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


class Image(TVTensor):
""":class:`torch.Tensor` subclass for images.
""":class:`torch.Tensor` subclass for images with shape ``[..., C, H, W]``.

.. note::

Expand Down
2 changes: 1 addition & 1 deletion torchvision/tv_tensors/_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


class Mask(TVTensor):
""":class:`torch.Tensor` subclass for segmentation and detection masks.
""":class:`torch.Tensor` subclass for segmentation and detection masks with shape ``[..., H, W]``.

Args:
data (tensor-like, PIL.Image.Image): Any data that can be turned into a tensor with :func:`torch.as_tensor` as
Expand Down
2 changes: 1 addition & 1 deletion torchvision/tv_tensors/_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class Video(TVTensor):
""":class:`torch.Tensor` subclass for videos.
""":class:`torch.Tensor` subclass for videos with shape ``[..., T, C, H, W]``.

Args:
data (tensor-like): Any data that can be turned into a tensor with :func:`torch.as_tensor`.
Expand Down
Loading