Skip to content

Commit 27b2fb6

Browse files
NicolasHugfacebook-github-bot
authored andcommitted
[fbsync] Add docs for functionals v2 (#7328)
Summary: Co-authored-by: Philip Meier <[email protected]> Reviewed By: vmoens Differential Revision: D44416631 fbshipit-source-id: 87b4e09411b22d5916ffd4e4af00f5f49f3a15e9
1 parent ae6eb58 commit 27b2fb6

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docs/source/transforms.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ Transforming and augmenting images
55

66
.. currentmodule:: torchvision.transforms
77

8+
9+
.. note::
10+
In 0.15, we released a new set of transforms available in the
11+
``torchvision.transforms.v2`` namespace, which add support for transforming
12+
not just images but also bounding boxes, masks, or videos. These transforms
13+
are fully backward compatible with the current ones, and you'll see them
14+
documented below with a `v2.` prefix. To get started with those new
15+
transforms, you can check out
16+
:ref:`sphx_glr_auto_examples_plot_transforms_v2_e2e.py`.
17+
Note that these transforms are still BETA, and while we don't expect major
18+
breaking changes in the future, some APIs may still change according to user
19+
feedback. Please submit any feedback you may have in
20+
https://github.com/pytorch/vision/issues/6753, and you can also check out
21+
https://github.com/pytorch/vision/issues/7319 to learn more about the APIs
22+
that we suspect might involve future changes.
23+
824
Transforms are common image transformations available in the
925
``torchvision.transforms`` module. They can be chained together using
1026
:class:`Compose`.
@@ -253,6 +269,14 @@ Functional Transforms
253269

254270
.. currentmodule:: torchvision.transforms.functional
255271

272+
273+
.. note::
274+
You'll find below the documentation for the existing
275+
``torchvision.transforms.functional`` namespace. The
276+
``torchvision.transforms.v2.functional`` namespace exists as well and can be
277+
used! The same functionals are present, so you simply need to change your
278+
import to rely on the ``v2`` namespace.
279+
256280
Functional transforms give you fine-grained control of the transformation pipeline.
257281
As opposed to the transformations above, functional transforms don't contain a random number
258282
generator for their parameters.

0 commit comments

Comments
 (0)