class_docstr: Shallow models for knowledge representation learning.
      
docstr: Compute scores of negative samples
          
code: def get_neg_score(
      self, ent_emb, rel_emb, neg_emb, neg_head=False, mask=None
  ):
      """Compute scores of negative samples"""
      ent_emb = paddle.reshape(
          ent_emb, (self._num_chunks, -1, self._ent_dim)
      )
      rel_emb = paddle.reshape(
          rel_emb, (self._num_chunks, -1, self._rel_dim)
      )
  
      if neg_head:
          h_emb = neg_emb
          t_emb = ent_emb
      else:
          h_emb = ent_emb
          t_emb = neg_emb
  
      score = self._score_func.get_neg_score(
          h_emb, rel_emb, t_emb, neg_head
      )
  
      if mask is not None:
          score = score * mask
  
      return score
  
imports: import os
  import json
  import math
  import warnings
  import numpy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from pgl.utils.shared_embedding import SharedEmbedding
  from models.score_funcs import TransEScore, RotatEScore, DistMultScore, ComplExScore, QuatEScore, OTEScore
  from models.init_func import InitFunction
  from utils import uniform, timer_wrapper
label_desc: Use image node_id 8 for calling the KGEModel obj's underlying member method code with example usage: obj.get_neg_score(ent_emb, rel_emb, neg_emb, neg_head, mask) and returns: score