train = False in test_dataloader (#162)

A small change to the CoolModel example.
Now test_dataloader returns the MNIST test dataset.
This commit is contained in:
Sebastian Præsius 2019-08-22 23:44:06 +02:00 committed by William Falcon
parent 4a0b56755c
commit 9fc66026f1
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ class CoolModel(pl.LightningModule):
@pl.data_loader @pl.data_loader
def test_dataloader(self): def test_dataloader(self):
# OPTIONAL # OPTIONAL
return DataLoader(MNIST(os.getcwd(), train=True, download=True, transform=transforms.ToTensor()), batch_size=32) return DataLoader(MNIST(os.getcwd(), train=False, download=True, transform=transforms.ToTensor()), batch_size=32)
``` ```
--- ---
### How do these methods fit into the broader training? ### How do these methods fit into the broader training?