microsoft / Graphormer

Graphormer is a general-purpose deep learning backbone for molecular modeling.
MIT License
2.14k stars 337 forks source link

How to evaluate the model with V.2? #60

Open AmeenAli opened 2 years ago

AmeenAli commented 2 years ago

Hi, How can I print the eval accuracy after each epoch in the new version of Graphormer?

zhengsx commented 2 years ago

graphormer/criterions/binary_logloss.py provides the accuracy metrics, and if your objective is a multi-task binary classification, it will count the average accuracy over all tasks. If you want to use other metric, like AUC, you can refer to this.

AmeenAli commented 2 years ago

Thanks! where does this gets called? as i dont see from out output logging the acc of the validation/test

zhengsx commented 2 years ago

do you use --criterion binary_logloss ?

AmeenAli commented 2 years ago

I am running the example of ZIN where --criterion l1_loss , and it still does not output validation.

shiyu1994 commented 2 years ago

With l1_loss, the loss is exactly the MAE. And the loss of valid set should be evaluated after every epoch. Running zinc.sh script in the example folder gives following log log