NVIDIA-Merlin / Transformers4Rec

Transformers4Rec is a flexible and efficient library for sequential and session-based recommendation and works with PyTorch.
https://nvidia-merlin.github.io/Transformers4Rec/main
Apache License 2.0
1.07k stars 142 forks source link

[QST] Cross-entropy and pairwise losses are supported in Next Item Prediction #751

Open ralgond opened 9 months ago

ralgond commented 9 months ago

❓ Cross-entropy and pairwise losses are supported in Next Item Prediction

I found the text as following on page https://nvidia-merlin.github.io/Transformers4Rec/stable/model_definition.html?highlight=pairwise%20loss

Next Item Prediction: Predicts next items for a given sequence of interactions. During training, the prediction can be the next item or randomly selected items depending on the masking scheme. For inference, the intended purpose is to always predict the next interacted item. Cross-entropy and pairwise losses are supported.

Could you please tell me how to use pairwise losses instead of Cross-entorpy please?