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.
  num_rels : int
      Numer of relation types.
  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",".","num_rels",":","int","Numer","of","relation","types",".","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,
      num_nodes,
      h_dim,
      out_dim,
      num_rels,
      num_bases=None,
      num_hidden_layers=1,
      dropout=0,
      use_self_loop=False,
      layer_norm=False,
  ):
      super(EntityClassify, self).__init__()
      self.device = device
      self.num_nodes = num_nodes
      self.h_dim = h_dim
      self.out_dim = out_dim
      self.num_rels = num_rels
      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(
          RelGraphConv(
              self.h_dim,
              self.h_dim,
              self.num_rels,
              "basis",
              self.num_bases,
              activation=F.relu,
              self_loop=self.use_self_loop,
              dropout=self.dropout,
              layer_norm=layer_norm,
          )
      )
      # h2h
      for idx in range(self.num_hidden_layers):
          self.layers.append(
              RelGraphConv(
                  self.h_dim,
                  self.h_dim,
                  self.num_rels,
                  "basis",
                  self.num_bases,
                  activation=F.relu,
                  self_loop=self.use_self_loop,
                  dropout=self.dropout,
                  layer_norm=layer_norm,
              )
          )
      # h2o
      self.layers.append(
          RelGraphConv(
              self.h_dim,
              self.out_dim,
              self.num_rels,
              "basis",
              self.num_bases,
              activation=None,
              self_loop=self.use_self_loop,
              layer_norm=layer_norm,
          )
      )
  
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 1 to create a new EntityClassify object from inherited base classes: nn with example: obj = EntityClassify(device, num_nodes, h_dim, out_dim, num_rels, num_bases, num_hidden_layers, dropout, use__loop, layer_norm)