generative-recommenders icon indicating copy to clipboard operation
generative-recommenders copied to clipboard

confused about "SampledSoftmaxLoss" func

Open zhhu1996 opened this issue 5 months ago • 3 comments

Hey, Congratulations for your perfect and creative work. when I read the implementation code here, I am very confused about SampledSoftmaxLoss. I have some questions for this:

  1. why do we use "supervision_ids" to calculate "positive_logits"?
  2. why wu use "InBatchNegativesSampler" to random sample negative samples and calculate "negative_logits"?
  3. what does the "self._model.interaction" do?
  4. for jaggled_loss, why need to firstly concat in 1 dim and then calculate log_softmax in 1 dim and last pick the 0 dim?

Please give me some advice if you are free, thanks~

zhhu1996 avatar Sep 22 '24 12:09 zhhu1996