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
dd66a9d8
Unverified
Commit
dd66a9d8
authored
Mar 13, 2024
by
Nicolas Hug
Committed by
GitHub
Mar 13, 2024
Browse files
Add minor comment about ToTensor (#8300)
parent
bdd690e5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
torchvision/transforms/v2/_deprecated.py
torchvision/transforms/v2/_deprecated.py
+2
-0
No files found.
torchvision/transforms/v2/_deprecated.py
View file @
dd66a9d8
...
...
@@ -17,6 +17,7 @@ class ToTensor(Transform):
.. warning::
:class:`v2.ToTensor` is deprecated and will be removed in a future release.
Please use instead ``v2.Compose([v2.ToImage(), v2.ToDtype(torch.float32, scale=True)])``.
Output is equivalent up to float precision.
This transform does not support torchscript.
...
...
@@ -41,6 +42,7 @@ class ToTensor(Transform):
warnings
.
warn
(
"The transform `ToTensor()` is deprecated and will be removed in a future release. "
"Instead, please use `v2.Compose([v2.ToImage(), v2.ToDtype(torch.float32, scale=True)])`."
"Output is equivalent up to float precision."
)
super
().
__init__
()
...
...
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