NTMC-Community / MatchZoo

Facilitating the design, comparison and sharing of deep text matching models.
Apache License 2.0
3.82k stars 898 forks source link

How to get validation loss - Question #828

Closed shimengfeng closed 4 years ago

shimengfeng commented 4 years ago

Describe the Question

For example, if I use the DSSM Model with the data generator for ranking task with RankCrossEntropy loss. During the training process, I will be able to get the training loss output. Is this loss generated by the RankCrossEntropy loss function? I understand I can have different evaluation metrics such as NDCG. But how could I get validation loss as one of the output? The end goal is to plot both train loss and validation loss across different epoch to understand the model more and how I can improve it.

Also, another question is that it takes a long time to create my data generator since I have large data. Thus, is there a way I can save my generator and reuse it elsewhere?

I am using MatchZoo 2.2.0 version. I cannot provide a data example, but more than happy to explain more of my question if there is any confusion.