class_docstr: Embedding layer for featureless heterograph.
  Parameters
  ----------
  device : int
      Device to run the layer.
  num_nodes : int
      Number of nodes.
  node_tides : tensor
      Storing the node type id for each node starting from 0
  num_of_ntype : int
      Number of node types
  input_size : list of int
      A list of input feature size for each node type. If None, we then
      treat certain input feature as an one-hot encoding feature.
  embed_size : int
      Output embed size
  embed_name : str, optional
      Embed name
class_docstr_tok: ["Embedding","layer","for","featureless","heterograph",".","Parameters","--","--","--","--","--","device",":","int","Device","to","run","the","layer",".","num_nodes",":","int","Number","of","nodes",".","node_tides",":","tensor","Storing","the","node","type","id","for","each","node","starting","from","0","num_of_ntype",":","int","Number","of","node","types","input_size",":","list","of","int","A","list","of","input","feature","size","for","each","node","type",".","If","None",",","we","then","treat","certain","input","feature","as","an","one-hot","encoding","feature",".","embed_size",":","int","Output","embed","size","embed_name",":","str",",","optional","Embed","name"]
docstr: Forward computation
  Parameters
  ----------
  node_ids : tensor
      node ids to generate embedding for.
  node_tids : tensor
      node type ids
  features : list of features
      list of initial features for nodes belong to different node type.
      If None, the corresponding features is an one-hot encoding feature,
      else use the features directly as input feature and matmul a
      projection matrix.
  Returns
  -------
  tensor
      embeddings as the input of the next layer
docstr_tok: ["Forward","computation","Parameters","--","--","--","--","--","node_ids",":","tensor","node","ids","to","generate","embedding","for",".","node_tids",":","tensor","node","type","ids","features",":","list","of","features","list","of","initial","features","for","nodes","belong","to","different","node","type",".","If","None",",","the","corresponding","features","is","an","one-hot","encoding","feature",",","else","use","the","features","directly","as","input","feature","and","matmul","a","projection","matrix",".","Returns","--","--","--","-","tensor","embeddings","as","the","input","of","the","next","layer"]
code: def forward(self, node_ids, node_tids, type_ids, features):
      """Forward computation
      Parameters
      ----------
      node_ids : tensor
          node ids to generate embedding for.
      node_tids : tensor
          node type ids
      features : list of features
          list of initial features for nodes belong to different node type.
          If None, the corresponding features is an one-hot encoding feature,
          else use the features directly as input feature and matmul a
          projection matrix.
      Returns
      -------
      tensor
          embeddings as the input of the next layer
      """
      tsd_ids = node_ids.to(self.node_embeds.weight.device)
      embeds = th.empty(
          node_ids.shape[0], self.embed_size, device=self.device
      )
      for ntype in range(self.num_of_ntype):
          if features[ntype] is not None:
              loc = node_tids == ntype
              embeds[loc] = features[ntype][type_ids[loc]].to(
                  self.device
              ) @ self.embeds[str(ntype)].to(self.device)
          else:
              loc = node_tids == ntype
              embeds[loc] = self.node_embeds(tsd_ids[loc]).to(
                  self.device
              )
  
      return embeds
  
imports: import itertools
  import time
  import dgl
  import dgl.nn.pytorch
  import torch
  import torch.multiprocessing
  import torch.nn
  import torch.nn.functional
  import torch.optim
  from dgl.nn import RelGraphConv
  from torch.utils.data import DataLoader
  from ..None import utils
label_desc: Use image node_id 2 for calling the RelGraphEmbedLayer obj's underlying member method code with example usage: obj.forward(node_ids, node_tids, type_ids, features) and returns: embeds