Skip to content

Commit

Permalink
Fix ImageNet val loader to use val transform (#713)
Browse files Browse the repository at this point in the history
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
tridao and mergify[bot] authored Aug 29, 2021
1 parent 58c7769 commit b8a6afa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Fixed ImageNet val loader to use val transform instead of train transform.

- Fixed the MNIST download giving HTTP 404 with torchvision>=0.9.1 ([#674](https://github.com/PyTorchLightning/lightning-bolts/pull/674))


Expand Down
2 changes: 1 addition & 1 deletion pl_bolts/datamodules/imagenet_datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def val_dataloader(self) -> DataLoader:
batch_size: the batch size
transforms: the transforms
"""
transforms = self.train_transform() if self.val_transforms is None else self.val_transforms
transforms = self.val_transform() if self.val_transforms is None else self.val_transforms

dataset = UnlabeledImagenet(
self.data_dir,
Expand Down

0 comments on commit b8a6afa

Please sign in to comment.