Skip to content

Commit

Permalink
Add missing lambda to transforms in tutorial (#49)
Browse files Browse the repository at this point in the history
Summary:
## Motivation and Context

Closes #32 by adding lambda in the tutorial. Code changes to be made in #41 - this is just a quickfix.

## How Has This Been Tested

## Types of changes

- [x] Docs change / refactoring / dependency upgrade
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Checklist

- [x] My code follows the code style of this project.
- [x] My change requires a change to the documentation.
- [x] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
- [x] I have completed my CLA (see **CONTRIBUTING**)
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.

Pull Request resolved: #49

Reviewed By: tullie

Differential Revision: D28685418

Pulled By: kalyanvasudev

fbshipit-source-id: 0984c0433119be11c768d784e1c05d22ffec4729
  • Loading branch information
nateraw authored and facebook-github-bot committed May 25, 2021
1 parent 3fd83cb commit b3f55aa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions website/docs/tutorial_classification.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ from pytorchvideo.transforms import (

from torchvision.transforms import (
Compose,
Lambda,
RandomCrop,
RandomHorizontalFlip
)
Expand All @@ -122,6 +123,7 @@ class KineticsDataModule(pytorch_lightning.LightningDataModule):
transform=Compose(
[
UniformTemporalSubsample(8),
Lambda(lambda x: x / 255.0),
Normalize((0.45, 0.45, 0.45), (0.225, 0.225, 0.225)),
RandomShortSideScale(min_size=256, max_size=320),
RandomCrop(244),
Expand Down

0 comments on commit b3f55aa

Please sign in to comment.