Replies: 1 comment
-
I think you need to call the obj = DataModuleClass()
obj.prepare_data()
obj.setup() or you call it inside the def setup(self):
self.prepare_data()
data = self.training_dataset
self.train_data, self.val_data = random_split(data, [8, 2])
return self.train_data, self.val_data
To know more, you can look into the source code |
Beta Was this translation helpful? Give feedback.
0 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.
-
I am trying to learn
PyTorch Lightning
by writing a very simpleDataModuleClass
. Afterprepare_data()
, andsetup()
I am trying to check these functions are working or not. So, I am trying to get thetraining
andvalidation
dataset fromsetup()
. But I am getting an errorCode
Could you tell me why I am getting this error?
Beta Was this translation helpful? Give feedback.
All reactions