Unverified Commit dd66a9d8 authored by Nicolas Hug's avatar Nicolas Hug Committed by GitHub
Browse files

Add minor comment about ToTensor (#8300)

parent bdd690e5
......@@ -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__()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment