Skip to content

Commit a18e031

Browse files
authored
Merge branch 'main' into transforms/scale_jitter
2 parents b6a1694 + 48a61df commit a18e031

34 files changed

+1563
-323
lines changed

docs/source/transforms.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ The new transform can be used standalone or mixed-and-matched with existing tran
198198
AutoAugment
199199
RandAugment
200200
TrivialAugmentWide
201+
AugMix
201202

202203
.. _functional_transforms:
203204

gallery/plot_transforms.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,14 @@ def plot(imgs, with_orig=True, row_title=None, **imshow_kwargs):
263263
imgs = [augmenter(orig_img) for _ in range(4)]
264264
plot(imgs)
265265

266+
####################################
267+
# AugMix
268+
# ~~~~~~
269+
# The :class:`~torchvision.transforms.AugMix` transform automatically augments the data.
270+
augmenter = T.AugMix()
271+
imgs = [augmenter(orig_img) for _ in range(4)]
272+
plot(imgs)
273+
266274
####################################
267275
# Randomly-applied transforms
268276
# ---------------------------

packaging/README.md

Lines changed: 3 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,6 @@
11
# Building torchvision packages for release
22

3-
## Anaconda packages
3+
TorchVision release packages are built by using `build_wheel.sh` and `build_conda.sh` for all permutations of
4+
supported operating systems, compute platforms and python versions.
45

5-
### Linux
6-
7-
```bash
8-
nvidia-docker run -it --ipc=host --rm -v $(pwd):/remote soumith/conda-cuda bash
9-
pushd remote/conda
10-
11-
./build_vision.sh 9.0
12-
./build_vision.sh 10.0
13-
./build_vision.sh cpu
14-
15-
# copy packages over to /remote
16-
# exit docker
17-
# anaconda upload -u pytorch torchvision*.bz2
18-
```
19-
20-
### OSX
21-
22-
```bash
23-
# create a fresh anaconda environment / install and activate it
24-
conda install -y conda-build anaconda-client
25-
./build_vision.sh cpu
26-
27-
# copy packages over to /remote
28-
# exit docker
29-
# anaconda upload -u pytorch torchvision*.bz2
30-
```
31-
32-
### Windows
33-
34-
```bash
35-
# Open `Git Bash` and change dir to `conda`
36-
./build_vision.sh 9.0
37-
./build_vision.sh 10.0
38-
./build_vision.sh cpu
39-
40-
# copy packages to a output directory
41-
# anaconda upload -u pytorch torchvision*.bz2
42-
```
43-
44-
## Wheels
45-
46-
### Linux
47-
48-
pushd wheel
49-
50-
```bash
51-
nvidia-docker run -it --ipc=host --rm -v $(pwd):/remote soumith/manylinux-cuda90:latest bash
52-
cd remote
53-
./linux_manywheel.sh cu90
54-
55-
rm -rf /usr/local/cuda*
56-
./linux_manywheel.sh cpu
57-
```
58-
59-
```bash
60-
nvidia-docker run -it --ipc=host --rm -v $(pwd):/remote soumith/manylinux-cuda100:latest bash
61-
cd remote
62-
./linux_manywheel.sh cu100
63-
```
64-
65-
wheels are in the folders `cpu`, `cu90`, `cu100`.
66-
67-
You can upload the `cu90` wheels to twine with `twine upload *.whl`.
68-
Which wheels we upload depends on which wheels PyTorch uploads as default, and right now, it's `cu90`.
69-
70-
### OSX
71-
72-
```bash
73-
pushd wheel
74-
./osx_wheel.sh
75-
```
76-
77-
### Windows
78-
79-
```cmd
80-
set PYTORCH_REPO=pytorch
81-
82-
pushd windows
83-
call build_vision.bat 90 0.3.0 1
84-
call build_vision.bat 100 0.3.0 1
85-
call build_vision.bat cpu 0.3.0 1
86-
```
87-
88-
wheels are in the current folder.
89-
90-
You can upload them to twine with `twine upload *.whl`
6+
OS/Python/Compute matrix is defined in https://github.com/pytorch/vision/blob/main/.circleci/regenerate.py

packaging/wheel/linux_manywheel.sh

Lines changed: 0 additions & 59 deletions
This file was deleted.

packaging/wheel/osx_wheel.sh

Lines changed: 0 additions & 50 deletions
This file was deleted.

references/classification/presets.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ def __init__(
2222
trans.append(autoaugment.RandAugment(interpolation=interpolation))
2323
elif auto_augment_policy == "ta_wide":
2424
trans.append(autoaugment.TrivialAugmentWide(interpolation=interpolation))
25+
elif auto_augment_policy == "augmix":
26+
trans.append(autoaugment.AugMix(interpolation=interpolation))
2527
else:
2628
aa_policy = autoaugment.AutoAugmentPolicy(auto_augment_policy)
2729
trans.append(autoaugment.AutoAugment(policy=aa_policy, interpolation=interpolation))

test/test_prototype_builtin_datasets.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ def test_no_vanilla_tensors(self, test_home, dataset_mock, config):
9999
f"{sequence_to_str(sorted(vanilla_tensors), separate_last='and ')} contained vanilla tensors."
100100
)
101101

102-
@pytest.mark.xfail
103102
@parametrize_dataset_mocks(DATASET_MOCKS)
104103
def test_transformable(self, test_home, dataset_mock, config):
105104
dataset_mock.prepare(test_home, config)

0 commit comments

Comments
 (0)