Skip to content

Commit 3fad5be

Browse files
committed
Oops
1 parent 7f8ed88 commit 3fad5be

6 files changed

+2
-38
lines changed

gallery/v2_transforms/plot_custom_datapoints.py

-6
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@
1111

1212
# %%
1313
import torch
14-
import torchvision
15-
16-
# We are using BETA APIs, so we deactivate the associated warning, thereby acknowledging that
17-
# some APIs may slightly change in the future
18-
torchvision.disable_beta_transforms_warning()
19-
2014
from torchvision import datapoints
2115
from torchvision.transforms import v2
2216

gallery/v2_transforms/plot_custom_transforms.py

-6
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@
99

1010
# %%
1111
import torch
12-
import torchvision
13-
14-
# We are using BETA APIs, so we deactivate the associated warning, thereby acknowledging that
15-
# some APIs may slightly change in the future
16-
torchvision.disable_beta_transforms_warning()
17-
1812
from torchvision import datapoints
1913
from torchvision.transforms import v2
2014

gallery/v2_transforms/plot_cutmix_mixup.py

-6
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,7 @@
1717

1818
# %%
1919
import torch
20-
import torchvision
2120
from torchvision.datasets import FakeData
22-
23-
# We are using BETA APIs, so we deactivate the associated warning, thereby acknowledging that
24-
# some APIs may slightly change in the future
25-
torchvision.disable_beta_transforms_warning()
26-
2721
from torchvision.transforms import v2
2822

2923

gallery/v2_transforms/plot_datapoints.py

-6
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@
2424
import PIL.Image
2525

2626
import torch
27-
import torchvision
28-
29-
# We are using BETA APIs, so we deactivate the associated warning, thereby acknowledging that
30-
# some APIs may slightly change in the future
31-
torchvision.disable_beta_transforms_warning()
32-
3327
from torchvision import datapoints
3428
from torchvision.transforms.v2 import functional as F
3529

gallery/v2_transforms/plot_transforms_v2.py

-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import pathlib
1212

1313
import torch
14-
import torchvision
1514

1615

1716
def load_data():
@@ -42,9 +41,6 @@ def load_data():
4241
# detection or instance and semantic segmentation. Still, the interface is the same, making
4342
# :mod:`torchvision.transforms.v2` a drop-in replacement for the existing :mod:`torchvision.transforms` API, aka v1.
4443

45-
# We are using BETA APIs, so we deactivate the associated warning, thereby acknowledging that
46-
# some APIs may slightly change in the future
47-
torchvision.disable_beta_transforms_warning()
4844
import torchvision.transforms.v2 as transforms
4945

5046
transform = transforms.Compose(

gallery/v2_transforms/plot_transforms_v2_e2e.py

+2-10
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
import torch
1717
import torch.utils.data
1818

19-
import torchvision
19+
from torchvision import models, datasets
20+
import torchvision.transforms.v2 as transforms
2021

2122

2223
def show(sample):
@@ -39,19 +40,10 @@ def show(sample):
3940
fig.show()
4041

4142

42-
# We are using BETA APIs, so we deactivate the associated warning, thereby acknowledging that
43-
# some APIs may slightly change in the future
44-
torchvision.disable_beta_transforms_warning()
45-
46-
from torchvision import models, datasets
47-
import torchvision.transforms.v2 as transforms
48-
49-
5043
# %%
5144
# We start off by loading the :class:`~torchvision.datasets.CocoDetection` dataset to have a look at what it currently
5245
# returns, and we'll see how to convert it to a format that is compatible with our new transforms.
5346

54-
5547
def load_example_coco_detection_dataset(**kwargs):
5648
# This loads fake data for illustration purposes of this example. In practice, you'll have
5749
# to replace this with the proper data

0 commit comments

Comments
 (0)