code: def __init__(
      self, ent_tot, rel_tot, dim=100, margin=6.0, epsilon=2.0
  ):
      super(RotatE, self).__init__(ent_tot, rel_tot)
  
      self.margin = margin
      self.epsilon = epsilon
  
      self.dim_e = dim * 2
      self.dim_r = dim
  
      self.ent_embeddings = nn.Embedding(self.ent_tot, self.dim_e)
      self.rel_embeddings = nn.Embedding(self.rel_tot, self.dim_r)
  
      self.ent_embedding_range = nn.Parameter(
          torch.Tensor([(self.margin + self.epsilon) / self.dim_e]),
          requires_grad=False,
      )
  
      nn.init.uniform_(
          tensor=self.ent_embeddings.weight.data,
          a=-self.ent_embedding_range.item(),
          b=self.ent_embedding_range.item(),
      )
  
      self.rel_embedding_range = nn.Parameter(
          torch.Tensor([(self.margin + self.epsilon) / self.dim_r]),
          requires_grad=False,
      )
  
      nn.init.uniform_(
          tensor=self.rel_embeddings.weight.data,
          a=-self.rel_embedding_range.item(),
          b=self.rel_embedding_range.item(),
      )
  
      self.margin = nn.Parameter(torch.Tensor([margin]))
      self.margin.requires_grad = False
  
file_path: OpenKE/openke/module/model/RotatE.py
imports: import torch
  import torch.autograd
  import torch.nn
  from .Model import Model
label_desc: Use image node_id 1 to create a new RotatE object from inherited base classes: Model with example: obj = RotatE(ent_tot, rel_tot, dim, margin, epsilon)