class_docstr: Embedding layer for featureless heterograph.
docstr: Forward computation
  
  Parameters
  ----------
  block : DGLGraph, optional
      If not specified, directly return the full graph with embeddings stored in
      :attr:`embed_name`. Otherwise, extract and store the embeddings to the block
      graph and return.
  
  Returns
  -------
  DGLGraph
      The block graph fed with embeddings.
docstr_tok: ["Forward","computation","Parameters","--","--","--","--","--","block",":","DGLGraph",",","optional","If","not","specified",",","directly","return","the","full","graph","with","embeddings","stored","in",":","attr",":","`","embed_name","`",".","Otherwise",",","extract","and","store","the","embeddings","to","the","block","graph","and","return",".","Returns","--","--","--","-","DGLGraph","The","block","graph","fed","with","embeddings","."]
code: def forward(self, block=None):
      """Forward computation
  
      Parameters
      ----------
      block : DGLGraph, optional
          If not specified, directly return the full graph with embeddings stored in
          :attr:`embed_name`. Otherwise, extract and store the embeddings to the block
          graph and return.
  
      Returns
      -------
      DGLGraph
          The block graph fed with embeddings.
      """
      embeds = {}
      for ntype in block.ntypes:
          if self.node_feats[ntype] is None:
              embeds[ntype] = self.node_embeds[ntype](
                  block.nodes(ntype)
              ).to(self.device)
          else:
              embeds[ntype] = (
                  self.node_feats[ntype][block.nodes(ntype)].to(
                      self.device
                  )
                  @ self.embeds[ntype]
              )
      return embeds
  
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 2 for calling the RelGraphEmbed obj's underlying member method code with example usage: obj.forward(block) and returns: embeds