Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ImageNet val loader to use val transform #713

Merged
merged 4 commits into from Aug 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
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
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