class_docstr: An abstract base class for implementing custom KGE models.
  
  Args:
      num_nodes (int): The number of nodes/entities in the graph.
      num_relations (int): The number of relations in the graph.
      hidden_channels (int): The hidden embedding size.
      sparse (bool, optional): If set to :obj:`True`, gradients w.r.t. to the
          embedding matrices will be sparse. (default: :obj:`False`)
code: def __init__(
      self,
      num_nodes: int,
      num_relations: int,
      hidden_channels: int,
      sparse: bool = False,
  ):
      super().__init__()
  
      self.num_nodes = num_nodes
      self.num_relations = num_relations
      self.hidden_channels = hidden_channels
  
      self.node_emb = Embedding(
          num_nodes, hidden_channels, sparse=sparse
      )
      self.rel_emb = Embedding(
          num_relations, hidden_channels, sparse=sparse
      )
  
file_path: pytorch_geometric/torch_geometric/nn/kge/base.py
imports: from typing import Tuple
  import torch
  from torch import Tensor
  from torch.nn import Embedding
  from tqdm import tqdm
  from torch_geometric.nn.kge.loader import KGTripletLoader
label_desc: Use image node_id 1 to create a new KGEModel object from inherited base classes: torch.nn with example: obj = KGEModel(num_nodes, num_relations, hidden_channels, sparse)