Dev (#125)
* add conference badges * change TestDataset to ImgDataset * update conda env * bump package versions * update README * move optuna config to subfolder
This commit is contained in:
1 parent
296c5bf5ed
commit
e27c11c342
8 files changed
+95
-87
No files matched your search
@@ -5,7 +5,7 @@ from PIL import Image
|
||||
from torch.utils.data import Dataset
|
||||
|
||||
|
||||
class TestDataset(Dataset):
|
||||
class ImgDataset(Dataset):
|
||||
"""Example dataset class for loading images from folder."""
|
||||
|
||||
def __init__(self, dir: str, transform: Optional[Callable] = None):
|
||||
|
||||
@@ -9,14 +9,14 @@ from torchvision.transforms import transforms
|
||||
class MNISTDataModule(LightningDataModule):
|
||||
"""
|
||||
Example of LightningDataModule for MNIST dataset.
|
||||
|
||||
|
||||
A DataModule implements 5 key methods:
|
||||
- prepare_data (things to do on 1 GPU/TPU, not on every GPU/TPU in distributed mode)
|
||||
- setup (things to do on every accelerator in distributed mode)
|
||||
- train_dataloader (the training dataloader)
|
||||
- val_dataloader (the validation dataloader(s))
|
||||
- test_dataloader (the test dataloader(s))
|
||||
|
||||
|
||||
This allows you to share a full dataset without explaining how to download,
|
||||
split, transform and process the data
|
||||
|
||||
@@ -31,7 +31,7 @@ class MNISTDataModule(LightningDataModule):
|
||||
batch_size: int = 64,
|
||||
num_workers: int = 0,
|
||||
pin_memory: bool = False,
|
||||
**kwargs
|
||||
**kwargs,
|
||||
):
|
||||
super().__init__()
|
||||
|
||||
|
||||
Reference in new issue
Block a user