Modernize data tutorial to torchvision v2 API#3863
Modernize data tutorial to torchvision v2 API#3863omkar-334 wants to merge 3 commits intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/3863
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 8710778 with merge base 08435cc ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Claude finished @sekyondaMeta's task in 1m 7s —— View job PR Review: Modernize data tutorial to torchvision v2 API
Summary: This is a clean, minimal change that correctly replaces the deprecated Review: LGTM ✅ The changes are correct and well-scoped:
No issues found. The change is minimal, addresses only the deprecation, and doesn't introduce unnecessary refactoring. |
Fixes ##3852
Description
Replace deprecated ToTensor() with v2.Compose([v2.ToImage(), v2.ToDtype(torch.float32, scale=True)]) in both the training and test FashionMNIST splits, and switch the import to the v2 namespace.
Checklist
cc @subramen