code: def rotatEscore(head, relation, tails):
      re_head, im_head = np.split(head, 2, -1)
      re_tail, im_tail = np.split(tails, 2, -1)
      gamma = 10
      hidden_dim = 100
      # gamma = 8
      # hidden_dim = 200
      emb_init = gamma / hidden_dim
      phase_rel = relation / (emb_init / np.pi)
      # phase_rel = relation
      re_rel, im_rel = np.cos(phase_rel), np.sin(phase_rel)
      re_score = re_head * re_rel - im_head * im_rel
      im_score = re_head * im_rel + im_head * re_rel
      re_score = re_score - re_tail  # [B, 1001, 768]
      im_score = im_score - im_tail  # [B, 1001, 768]
      score = np.stack([re_score, im_score], 0)
      # score = score.norm(dim=0)
      score = np.linalg.norm(score, 2, 0)  # B,1001
      score = score.sum(-1)
      return score
  
file_path: PGL/examples/kddcup2021/WikiKG90M/post_smoothing/get_score.py
imports: import numpy
  from glob import glob
  from tqdm import tqdm
  import sys
  import argparse
  import logging
  from multiprocessing import Pool
label_desc: Use image node_id 3 for calling a global function with example usage: rotatEscore(head, relation, tails) and returns: score