Training/Validation split in minimal example #5815
-
If you still can't find what you need: What is your question?I think it's unclear how the training data is split into a training and validation split in the minimal example. Does this example use all training data for both training and validation? As far as I'm aware, this is bad practice. Is there some magic background process which compares the training and validation data loaders and does splitting? I skimmed through the code and couldn't find anything. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
No, I don't think this is happening. The dataset in the minimal example is the MNIST dataset, which only has two splits (train and test). In this example, the validation set is the same as the training set and if we wanted to split it, we would have to use something like torch.utils.random_split. |
Beta Was this translation helpful? Give feedback.
-
exactly! it’s meant to show how lightning works, not how validation works :) |
Beta Was this translation helpful? Give feedback.
-
Should a training/validation split be something pytorch-lightning automates for you? Has this been considered as a feature? |
Beta Was this translation helpful? Give feedback.
-
The data preparation section (on the same page as the minimal example) describes how one would split the datasets into train/test/split. I don't think it's something that should be automated by pytorch-lightning since you can easily implement a split in |
Beta Was this translation helpful? Give feedback.
-
the link does not work. did you mean this? |
Beta Was this translation helpful? Give feedback.
No, I don't think this is happening. The dataset in the minimal example is the MNIST dataset, which only has two splits (train and test). In this example, the validation set is the same as the training set and if we wanted to split it, we would have to use something like torch.utils.random_split.