Beginner : the difference of split data in keras and pytorch

I am a beginner in Deep Learning and try sample project in keras and pytorch. I am noticed a little difference in both framework when split data.
Keras : train and test
pytorch : train, test, and valid

could anybody explain why there is a valid data in pytorch meanwhile there is only test data in keras?

Thank you

Hi! When using Keras and calling .fit() Keras there’s variable called validation_split which splits your training data to have a validation set. The default is 0.0, meaning the data won’t be split and you won’t have a validation set (unless you specify validation_data) - not a good idea.

Within PyTorch, there’s no fit style function so you need to write your own. I sense this is what is giving you the impression that there is no val in Keras as the train/test/val is a bit more clear in PyTorch’s case.

Does that help? It’s in Keras, just a bit more hidden.

Thank you for your explanation. It helps a lot

1 Like