torchmd-net icon indicating copy to clipboard operation
torchmd-net copied to clipboard

Test loss

Open raimis opened this issue 1 year ago • 2 comments

Which function is supposed to compute the test loss? Can we clean it up?

https://github.com/torchmd/torchmd-net/blob/2f6e19091ce161edb86568fe9a2af291a69b38d3/torchmdnet/module.py#L61-L69

Ping: @PhilippThoelke @stefdoerr

raimis avatar Aug 29 '22 08:08 raimis

Because of the way lighting works we could only do it this way

On Mon, Aug 29, 2022 at 10:27 AM Raimondas Galvelis < @.***> wrote:

Which function is supposed to compute the test loss? Can we clean it up?

https://github.com/torchmd/torchmd-net/blob/2f6e19091ce161edb86568fe9a2af291a69b38d3/torchmdnet/module.py#L61-L69

Ping: @PhilippThoelke https://github.com/PhilippThoelke @stefdoerr https://github.com/stefdoerr

— Reply to this email directly, view it on GitHub https://github.com/torchmd/torchmd-net/issues/120, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3KUOS7ZM4JKNDTJ52GK5LV3RX6PANCNFSM5743WLMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

giadefa avatar Aug 29 '22 09:08 giadefa

Loss is computed in step, no matter if during train, val or test. The function validation_step is called by pytorch-lightning to evaluate the model on all validation dataloaders. test_step is only called at the end of training or via trainer.test(...). Since we want to compute test loss during training, one of the validation dataloaders contains the test set.

PhilippThoelke avatar Aug 29 '22 22:08 PhilippThoelke