class_docstr: Computes a parameterised scalar mixture of :math:`N` tensors, :math:`mixture = \gamma * \sum_{k}(s_k * tensor_k)`
  where :math:`s = \mathrm{softmax}(w)`, with :math:`w` and :math:`\gamma` scalar parameters.
  
  Args:
      n_layers (int):
          The number of layers to be mixed, i.e., :math:`N`.
      dropout (float):
          The dropout ratio of the layer weights.
          If dropout > 0, then for each scalar weight, adjust its softmax weight mass to 0
          with the dropout probability (i.e., setting the unnormalized weight to -inf).
          This effectively redistributes the dropped probability mass to all other weights.
          Default: 0.
docstr: Args:
      tensors (list[~torch.Tensor]):
          :math:`N` tensors to be mixed.
  
  Returns:
      The mixture of :math:`N` tensors.
docstr_tok: ["Args",":","tensors","(","list","[","~torch.Tensor","]",")",":",":","math",":","`","N","`","tensors","to","be","mixed",".","Returns",":","The","mixture","of",":","math",":","`","N","`","tensors","."]
code: def forward(self, tensors):
      r"""
      Args:
          tensors (list[~torch.Tensor]):
              :math:`N` tensors to be mixed.
  
      Returns:
          The mixture of :math:`N` tensors.
      """
  
      normed_weights = self.dropout(self.weights.softmax(-1))
      weighted_sum = sum(w * h for w, h in zip(normed_weights, tensors))
  
      return self.gamma * weighted_sum
  
imports: import torch
  import torch.nn
label_desc: Use image node_id 3 for calling the ScalarMix obj's underlying member method code with example usage: obj.forward(tensors) and returns: unknown