class_docstr: This is the inner-product loss used in CFKG for optimization.
class_docstr_tok: ["This","is","the","inner-product","loss","used","in","CFKG","for","optimization","."]
code: def forward(self, anchor, positive, negative):
      pos_score = torch.mul(anchor, positive).sum(dim=1)
      neg_score = torch.mul(anchor, negative).sum(dim=1)
      return (F.softplus(-pos_score) + F.softplus(neg_score)).mean()
  
file_path: RecBole/recbole/model/knowledge_aware_recommender/cfkg.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  from recbole.model.abstract_recommender import KnowledgeRecommender
  from recbole.model.init import xavier_normal_initialization
  from recbole.utils import InputType
label_desc: Use image node_id 2 for calling the InnerProductLoss obj's underlying member method code with example usage: obj.forward(anchor, positive, negative) and returns: unknown