class_docstr: Embedding Entities and Relations for Learning and Inference in Knowledge Bases.
  https://arxiv.org/abs/1412.6575
class_docstr_tok: ["Embedding","Entities","and","Relations","for","Learning","and","Inference","in","Knowledge","Bases",".","https",":","\/\/arxiv.org\/abs\/1412.6575"]
code: def get_neg_score(self, head, rel, tail, neg_head=False):
      if neg_head:
          tail = tail * rel
          score = paddle.bmm(tail, head.transpose([0, 2, 1]))
          return score
      else:
          head = head * rel
          score = paddle.bmm(head, tail.transpose([0, 2, 1]))
          return score
  
imports: import math
  import numpy
  from numpy.random import RandomState
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle.nn.functional import log_sigmoid
label_desc: Use image node_id 3 for calling the DistMultScore obj's underlying member method code with example usage: obj.get_neg_score(head, rel, tail, neg_head) and returns: score, score