LightningDataModule in Colab on a dataset saved on my PC #12085
Unanswered
asad-ak
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 1 comment 5 replies
-
@asad-ak (I might not understand your question, but) if your dataset is available on your machine, then you can just skip downloading it in LightningDataModule and load it in your LightningDataModule. It should be something like: class MyDataModule(LightningModule):
def __init__(self, ..., data_dir: str):
self.data_dir = data_dir
def train_dataloader(self):
return DataLoader(MyDataset(self.data_dir))
dm = MyDataModule(..., data_dir="path/to/data/") |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have a question regarding how to go about using the LightningDataModule on a dataset that I have on my PC, every example I found was of MNIST which is downloaded on runtime. I have confusion in how to declare its path and specify it in my LightningDataModule functions.
Beta Was this translation helpful? Give feedback.
All reactions