Commit 68ed483
authored
Update torchvision transforms in quickstart tutorial (#3869)
Fixes #3851
## Description
Replaced all instances of `from torchvision.transforms import ToTensor`
with `from torchvision.transforms import v2` - line 29
Replaced all instances of `transform=ToTensor(),` with
`transform=v2.Compose([v2.ToImage(), v2.ToDtype(torch.float32,
scale=True)]),` - line 46 & 54
## Checklist
- [X] The issue that is being fixed is referred in the description (see
above "Fixes #ISSUE_NUMBER")
- [X] Only one issue is addressed in this pull request
- [X] Labels from the issue that this PR is fixing are added to this
pull request
- [X] No unnecessary issues are included into this pull request.
cc @subramen1 parent 5efb99a commit 68ed483
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
0 commit comments