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 use the pairwise hinge loss in the models #831

Open pandaczm opened 3 years ago

pandaczm commented 3 years ago

Is there any tutorial about how to apply the pairwise hinge loss to these models? Seems that all are related to the pointwise loss, but no pairwise loss.

faneshion commented 3 years ago

Hi, @pandaczm ,you can refer to this link to see the tutorial (https://github.com/NTMC-Community/MatchZoo-py/blob/master/tutorials/ranking/drmmtks.ipynb). Most of the typical loss function can be found in matchzoo.losses component, such as:

ranking_task = mz.tasks.Ranking(losses=mz.losses.RankHingeLoss()).