Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
9040793b
Unverified
Commit
9040793b
authored
Aug 17, 2023
by
Nicolas Hug
Committed by
GitHub
Aug 17, 2023
Browse files
Minor doc update (#7836)
parent
4cba51c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
torchvision/datapoints/__init__.py
torchvision/datapoints/__init__.py
+4
-3
torchvision/datapoints/_torch_function_helpers.py
torchvision/datapoints/_torch_function_helpers.py
+1
-1
No files found.
torchvision/datapoints/__init__.py
View file @
9040793b
...
...
@@ -15,14 +15,15 @@ if _WARN_ABOUT_BETA_TRANSFORMS:
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.datapoint
s
.Datapoint` subclass as ``like``.
If ``like`` is a :class:`~torchvision.datapoint.BoundingBoxes`, the ``format`` and ``canvas_size`` of
If ``like`` is a :class:`~torchvision.datapoint
s
.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.
"""
...
...
torchvision/datapoints/_torch_function_helpers.py
View file @
9040793b
...
...
@@ -16,7 +16,7 @@ class _ReturnTypeCM:
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment