materialsvirtuallab / megnet

Graph Networks as a Universal Machine Learning Framework for Molecules and Crystals
BSD 3-Clause "New" or "Revised" License
502 stars 156 forks source link

is there a parameter to have a validation before training? #288

Closed liuxiaotong15 closed 3 years ago

liuxiaotong15 commented 3 years ago

hi, all

I load a trained model first, then I start training on other datasets. However, I found even 1 epoch training make the model worse... And after early stopping, the 1 epoch training model was returned...

so is there a parameter to validate the model before training (and add the value to the early stopping list)? Then if 1 epoch worse the model, the origin model could be returned.

thanks

chc273 commented 3 years ago

@liuxiaotong15 it can happen if your data distribution is very different from the data the model was originally trained on.

I am not sure what exactly do you mean by "1 epoch worse the model". You will have to first test the model on your data to get the model performance. So if the 1 epoch model does not give your expected error, can you just use the pre-trained model? you can do the selection after the model training fairly easily i suppose.

liuxiaotong15 commented 3 years ago

thanks