class_docstr: DimeNet model.
  
  Parameters
  ----------
  emb_size
      Embedding size used throughout the model
  num_blocks
      Number of building blocks to be stacked
  num_bilinear
      Third dimension of the bilinear layer tensor
  num_spherical
      Number of spherical harmonics
  num_radial
      Number of radial basis functions
  cutoff
      Cutoff distance for interatomic interactions
  envelope_exponent
      Shape of the smooth cutoff
  num_before_skip
      Number of residual layers in interaction block before skip connection
  num_after_skip
      Number of residual layers in interaction block after skip connection
  num_dense_output
      Number of dense layers for the output blocks
  num_targets
      Number of targets to predict
  activation
      Activation function
  output_init
      Initial function in output block
class_docstr_tok: ["DimeNet","model",".","Parameters","--","--","--","--","--","emb_size","Embedding","size","used","throughout","the","model","num_blocks","Number","of","building","blocks","to","be","stacked","num_bilinear","Third","dimension","of","the","bilinear","layer","tensor","num_spherical","Number","of","spherical","harmonics","num_radial","Number","of","radial","basis","functions","cutoff","Cutoff","distance","for","interatomic","interactions","envelope_exponent","Shape","of","the","smooth","cutoff","num_before_skip","Number","of","residual","layers","in","interaction","block","before","skip","connection","num_after_skip","Number","of","residual","layers","in","interaction","block","after","skip","connection","num_dense_output","Number","of","dense","layers","for","the","output","blocks","num_targets","Number","of","targets","to","predict","activation","Activation","function","output_init","Initial","function","in","output","block"]
code: def __init__(
      self,
      emb_size,
      num_blocks,
      num_bilinear,
      num_spherical,
      num_radial,
      cutoff=5.0,
      envelope_exponent=5,
      num_before_skip=1,
      num_after_skip=2,
      num_dense_output=3,
      num_targets=12,
      activation=swish,
      output_init=nn.init.zeros_,
  ):
      super(DimeNet, self).__init__()
  
      self.num_blocks = num_blocks
      self.num_radial = num_radial
  
      # cosine basis function expansion layer
      self.rbf_layer = BesselBasisLayer(
          num_radial=num_radial,
          cutoff=cutoff,
          envelope_exponent=envelope_exponent,
      )
  
      self.sbf_layer = SphericalBasisLayer(
          num_spherical=num_spherical,
          num_radial=num_radial,
          cutoff=cutoff,
          envelope_exponent=envelope_exponent,
      )
  
      # embedding block
      self.emb_block = EmbeddingBlock(
          emb_size=emb_size,
          num_radial=num_radial,
          bessel_funcs=self.sbf_layer.get_bessel_funcs(),
          cutoff=cutoff,
          envelope_exponent=envelope_exponent,
          activation=activation,
      )
  
      # output block
      self.output_blocks = nn.ModuleList(
          {
              OutputBlock(
                  emb_size=emb_size,
                  num_radial=num_radial,
                  num_dense=num_dense_output,
                  num_targets=num_targets,
                  activation=activation,
                  output_init=output_init,
              )
              for _ in range(num_blocks + 1)
          }
      )
  
      # interaction block
      self.interaction_blocks = nn.ModuleList(
          {
              InteractionBlock(
                  emb_size=emb_size,
                  num_radial=num_radial,
                  num_spherical=num_spherical,
                  num_bilinear=num_bilinear,
                  num_before_skip=num_before_skip,
                  num_after_skip=num_after_skip,
                  activation=activation,
              )
              for _ in range(num_blocks)
          }
      )
  
file_path: dgl/examples/pytorch/dimenet/modules/dimenet.py
imports: import torch
  import torch.nn
  from modules.activations import swish
  from modules.bessel_basis_layer import BesselBasisLayer
  from modules.embedding_block import EmbeddingBlock
  from modules.interaction_block import InteractionBlock
  from modules.output_block import OutputBlock
  from modules.spherical_basis_layer import SphericalBasisLayer
label_desc: Use image node_id 1 to create a new DimeNet object from inherited base classes: nn with example: obj = DimeNet(emb_size, num_blocks, num_bilinear, num_spherical, num_radial, cutoff, envelope_exponent, num_before_skip, num_after_skip, num_dense_output, num_targets, activation, output_init)