class_docstr: Embedding layer for featureless heterograph.
code: def __init__(
      self,
      g,
      device,
      embed_size,
      num_nodes,
      node_feats,
      embed_name="embed",
      activation=None,
      dropout=0.0,
  ):
      super(RelGraphEmbed, self).__init__()
      self.g = g
      self.device = device
      self.embed_size = embed_size
      self.embed_name = embed_name
      self.activation = activation
      self.dropout = nn.Dropout(dropout)
      self.node_feats = node_feats
  
      # create weight embeddings for each node for each relation
      self.embeds = nn.ParameterDict()
      self.node_embeds = nn.ModuleDict()
      for ntype in g.ntypes:
          if node_feats[ntype] is None:
              sparse_emb = th.nn.Embedding(
                  num_nodes[ntype], embed_size, sparse=True
              )
              nn.init.uniform_(sparse_emb.weight, -1.0, 1.0)
              self.node_embeds[ntype] = sparse_emb
          else:
              input_emb_size = node_feats[ntype].shape[1]
              embed = nn.Parameter(
                  th.Tensor(input_emb_size, embed_size)
              )
              nn.init.xavier_uniform_(embed)
              self.embeds[ntype] = embed
  
imports: import itertools
  import time
  import traceback
  import dgl
  import dgl.nn.pytorch
  import torch
  import torch.multiprocessing
  import torch.nn
  import torch.nn.functional
  import torch.optim
  from torch.utils.data import DataLoader
  from ..None import utils
label_desc: Use image node_id 1 to create a new RelGraphEmbed object from inherited base classes: nn with example: obj = RelGraphEmbed(g, device, embed_size, num_nodes, node_feats, embed_name, activation, dropout)