code: def __init__(
      self,
      emb_size,
      num_radial,
      num_spherical,
      num_bilinear,
      num_before_skip,
      num_after_skip,
      activation=None,
  ):
      super(InteractionBlock, self).__init__()
  
      self.activation = activation
      # Transformations of Bessel and spherical basis representations
      self.dense_rbf = nn.Linear(num_radial, emb_size, bias=False)
      self.dense_sbf = nn.Linear(
          num_radial * num_spherical, num_bilinear, bias=False
      )
      # Dense transformations of input messages
      self.dense_ji = nn.Linear(emb_size, emb_size)
      self.dense_kj = nn.Linear(emb_size, emb_size)
      # Bilinear layer
      bilin_initializer = torch.empty(
          (emb_size, num_bilinear, emb_size)
      ).normal_(mean=0, std=2 / emb_size)
      self.W_bilin = nn.Parameter(bilin_initializer)
      # Residual layers before skip connection
      self.layers_before_skip = nn.ModuleList(
          [
              ResidualLayer(emb_size, activation=activation)
              for _ in range(num_before_skip)
          ]
      )
      self.final_before_skip = nn.Linear(emb_size, emb_size)
      # Residual layers after skip connection
      self.layers_after_skip = nn.ModuleList(
          [
              ResidualLayer(emb_size, activation=activation)
              for _ in range(num_after_skip)
          ]
      )
  
      self.reset_params()
  
file_path: dgl/examples/pytorch/dimenet/modules/interaction_block.py
imports: import dgl.function
  import torch
  import torch.nn
  from modules.initializers import GlorotOrthogonal
  from modules.residual_layer import ResidualLayer
label_desc: Use image node_id 1 to create a new InteractionBlock object from inherited base classes: nn with example: obj = InteractionBlock(emb_size, num_radial, num_spherical, num_bilinear, num_before_skip, num_after_skip, activation)