class_docstr: Link prediction network for graphs / knowledge graphs
class_docstr_tok: ["Link","prediction","network","for","graphs","\/","knowledge","graphs"]
code: def SimplE(heads, relations, tails):
      dim = heads.size(1) // 2
  
      tails = tails.view(-1, dim, 2).flip(2).view(-1, dim * 2)
  
      x = heads * relations * tails
      score = x.sum(dim=1)
      return score
  
file_path: graphvite/python/graphvite/application/network.py
imports: from __future__ import absolute_import
  import types
  import numpy
  import torch
  from torch import nn
label_desc: Use image node_id 8 for calling the LinkPredictor obj's underlying member method code with example usage: obj.SimplE(heads, relations, tails) and returns: score