class_docstr: Entity classification class for RGCN
  Parameters
  ----------
  device : int
      Device to run the layer.
  num_nodes : int
      Number of nodes.
  h_dim : int
      Hidden dim size.
  out_dim : int
      Output dim size.
  rel_names : list of str
      A list of relation names.
  num_bases : int
      Number of bases. If is none, use number of relations.
  num_hidden_layers : int
      Number of hidden RelGraphConv Layer
  dropout : float
      Dropout
  use_self_loop : bool
      Use self loop if True, default False.
class_docstr_tok: ["Entity","classification","class","for","RGCN","Parameters","--","--","--","--","--","device",":","int","Device","to","run","the","layer",".","num_nodes",":","int","Number","of","nodes",".","h_dim",":","int","Hidden","dim","size",".","out_dim",":","int","Output","dim","size",".","rel_names",":","list","of","str","A","list","of","relation","names",".","num_bases",":","int","Number","of","bases",".","If","is","none",",","use","number","of","relations",".","num_hidden_layers",":","int","Number","of","hidden","RelGraphConv","Layer","dropout",":","float","Dropout","use_self_loop",":","bool","Use","self","loop","if","True",",","default","False","."]
code: def __init__(
      self,
      device,
      h_dim,
      out_dim,
      rel_names,
      num_bases=None,
      num_hidden_layers=1,
      dropout=0,
      use_self_loop=False,
      layer_norm=False,
  ):
      super(EntityClassify, self).__init__()
      self.device = device
      self.h_dim = h_dim
      self.out_dim = out_dim
      self.num_bases = None if num_bases < 0 else num_bases
      self.num_hidden_layers = num_hidden_layers
      self.dropout = dropout
      self.use_self_loop = use_self_loop
      self.layer_norm = layer_norm
  
      self.layers = nn.ModuleList()
      # i2h
      self.layers.append(
          RelGraphConvLayer(
              self.h_dim,
              self.h_dim,
              rel_names,
              self.num_bases,
              activation=F.relu,
              self_loop=self.use_self_loop,
              dropout=self.dropout,
          )
      )
      # h2h
      for idx in range(self.num_hidden_layers):
          self.layers.append(
              RelGraphConvLayer(
                  self.h_dim,
                  self.h_dim,
                  rel_names,
                  self.num_bases,
                  activation=F.relu,
                  self_loop=self.use_self_loop,
                  dropout=self.dropout,
              )
          )
      # h2o
      self.layers.append(
          RelGraphConvLayer(
              self.h_dim,
              self.out_dim,
              rel_names,
              self.num_bases,
              activation=None,
              self_loop=self.use_self_loop,
          )
      )
  
imports: import argparse
  import gc, os
  import itertools
  import time
  import numpy
  from functools import partial
  import dgl
  import torch
  import torch.multiprocessing
  import torch.nn
  import torch.nn.functional
  import tqdm
  from dgl import DGLGraph, nn
  from dgl.distributed import DistDataLoader
  from ogb.nodeproppred import DglNodePropPredDataset
  from torch.multiprocessing import Queue
  from torch.nn.parallel import DistributedDataParallel
  from torch.utils.data import DataLoader
label_desc: Use image node_id 1 to create a new EntityClassify object from inherited base classes: nn with example: obj = EntityClassify(device, h_dim, out_dim, rel_names, num_bases, num_hidden_layers, dropout, use__loop, layer_norm)