code: def __init__(
      self,
      input_dims,
      output_dim,
      mm_dim=1600,
      chunks=20,
      rank=15,
      shared=False,
      dropout_input=0.0,
      dropout_pre_lin=0.0,
      dropout_output=0.0,
      pos_norm="before_cat",
  ):
      super().__init__()
      self.input_dims = input_dims
      self.output_dim = output_dim
      self.mm_dim = mm_dim
      self.chunks = chunks
      self.rank = rank
      self.shared = shared
      self.dropout_input = dropout_input
      self.dropout_pre_lin = dropout_pre_lin
      self.dropout_output = dropout_output
      assert pos_norm in ["before_cat", "after_cat"]
      self.pos_norm = pos_norm
      # Modules
      self.linear0 = nn.Linear(input_dims[0], mm_dim)
      if shared:
          self.linear1 = self.linear0
      else:
          self.linear1 = nn.Linear(input_dims[1], mm_dim)
      merge_linears0, merge_linears1 = [], []
      self.sizes_list = get_sizes_list(mm_dim, chunks)
      for size in self.sizes_list:
          ml0 = nn.Linear(size, size * rank)
          merge_linears0.append(ml0)
          if self.shared:
              ml1 = ml0
          else:
              ml1 = nn.Linear(size, size * rank)
          merge_linears1.append(ml1)
      self.merge_linears0 = nn.ModuleList(merge_linears0)
      self.merge_linears1 = nn.ModuleList(merge_linears1)
      self.linear_out = nn.Linear(mm_dim, output_dim)
      self.n_params = sum(
          p.numel() for p in self.parameters() if p.requires_grad
      )
  
      log_class_usage("Fusion", self.__class__)
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from mmf.common.registry import registry
  from mmf.utils.general import get_chunks, get_sizes_list, irfft, rfft
  from mmf.utils.logger import log_class_usage
label_desc: Use image node_id 1 to create a new Block object from inherited base classes: nn with example: obj = Block(input_dims, output_dim, mm_dim, chunks, rank, shared, dropout_input, dropout_pre_lin, dropout_output, pos_norm)