Skip to content

Commit

Permalink
Minor doc update (#7836)
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasHug authored Aug 17, 2023
1 parent 4cba51c commit 9040793
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions torchvision/datapoints/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@


def wrap(wrappee, *, like, **kwargs):
"""Convert a :class:`torch.Tensor` (``wrappee``) into the same :class:`~torchvision.datapoint.Datapoint` subclass as ``like``.
"""[BETA] Convert a :class:`torch.Tensor` (``wrappee``) into the same :class:`~torchvision.datapoints.Datapoint` subclass as ``like``.
If ``like`` is a :class:`~torchvision.datapoint.BoundingBoxes`, the ``format`` and ``canvas_size`` of
If ``like`` is a :class:`~torchvision.datapoints.BoundingBoxes`, the ``format`` and ``canvas_size`` of
``like`` are assigned to ``wrappee``, unless they are passed as ``kwargs``.
Args:
wrappee (Tensor): The tensor to convert.
like (Datapoint): The
like (:class:`~torchvision.datapoints.Datapoint`): The reference.
``wrappee`` will be converted into the same subclass as ``like``.
kwargs: Can contain "format" and "canvas_size" if ``like`` is a :class:`~torchvision.datapoint.BoundingBoxes`.
Ignored otherwise.
"""
Expand Down
2 changes: 1 addition & 1 deletion torchvision/datapoints/_torch_function_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __exit__(self, *args):


def set_return_type(return_type: str):
"""Set the return type of torch operations on datapoints.
"""[BETA] Set the return type of torch operations on datapoints.
This only affects the behaviour of torch operations. It has no effect on
``torchvision`` transforms or functionals, which will always return as
Expand Down

0 comments on commit 9040793

Please sign in to comment.