class_docstr: Computational module that computes several `blocks` independently from each other and aggregates the outputs.
  It expects audio inputs to be passed together with lengths, just like Jasper blocks, and all outputs to have
  the same dimensions but it does not impose any additional requirements on the structure of the blocks themselves.
  
  Args:
      blocks: List of Jasper blocks that will be computed concurently. It is expected that they accept the same
          input and return outputs with the same number of channels.
      aggregation_mode: an optional string, indicating how the outputs will be aggregated. Supported values are
          ['sum', 'dropout']. "sum" value forces outputs to be summed together. "dropout" value enables tower
          dropout training with different blocks being dropped out during training.
      block_dropout_prob: a probability of dropping any individual block during training with "dropout" aggregation
          mode. Acts as a regularization technique.
      residual_mode: an optional string indicating how residuals will be applied. Supported values are
          ['sum', 'conv']. In 'sum' mode input features are summed together with the output. This will fail if the
          number of channels in the input is different from the number of channels in an output tensor. In 'conv' mode
          inputs are passed through pointwise convolution to make input channel dimension match output channel
          dimension. In this mode `in_filters` and `out_filters` params are required.
      in_filters: number of filters (channels) in the input tensor of each block.
      out_filters: number of filters (channels) in the output tensor of each block.
class_docstr_tok: ["Computational","module","that","computes","several","`","blocks","`","independently","from","each","other","and","aggregates","the","outputs",".","It","expects","audio","inputs","to","be","passed","together","with","lengths",",","just","like","Jasper","blocks",",","and","all","outputs","to","have","the","same","dimensions","but","it","does","not","impose","any","additional","requirements","on","the","structure","of","the","blocks","themselves",".","Args",":","blocks",":","List","of","Jasper","blocks","that","will","be","computed","concurently",".","It","is","expected","that","they","accept","the","same","input","and","return","outputs","with","the","same","number","of","channels",".","aggregation_mode",":","an","optional","string",",","indicating","how","the","outputs","will","be","aggregated",".","Supported","values","are","[","'sum","'",",","'dropout","'","]",".","``","sum","''","value","forces","outputs","to","be","summed","together",".","``","dropout","''","value","enables","tower","dropout","training","with","different","blocks","being","dropped","out","during","training",".","block_dropout_prob",":","a","probability","of","dropping","any","individual","block","during","training","with","``","dropout","''","aggregation","mode",".","Acts","as","a","regularization","technique",".","residual_mode",":","an","optional","string","indicating","how","residuals","will","be","applied",".","Supported","values","are","[","'sum","'",",","'conv","'","]",".","In","'sum","'","mode","input","features","are","summed","together","with","the","output",".","This","will","fail","if","the","number","of","channels","in","the","input","is","different","from","the","number","of","channels","in","an","output","tensor",".","In","'conv","'","mode","inputs","are","passed","through","pointwise","convolution","to","make","input","channel","dimension","match","output","channel","dimension",".","In","this","mode","`","in_filters","`","and","`","out_filters","`","params","are","required",".","in_filters",":","number","of","filters","(","channels",")","in","the","input","tensor","of","each","block",".","out_filters",":","number","of","filters","(","channels",")","in","the","output","tensor","of","each","block","."]
code: def __init__(
      self,
      blocks,
      aggregation_mode: str = "sum",
      block_dropout_prob: int = 0.0,
      residual_mode: str = "sum",
      in_filters: int = None,
      out_filters: int = None,
  ):
      super().__init__()
      self.blocks = nn.ModuleList(blocks)
  
      self.supported_aggregations = ["sum", "dropout"]
      if aggregation_mode not in self.supported_aggregations:
          raise ValueError(
              f"Got non-supported aggregation mode: {aggregation_mode}. Supported values are {self.supported_aggregations}."
          )
      self.aggregation_mode = aggregation_mode
  
      if aggregation_mode == "dropout":
          self.weights = nn.Parameter(
              torch.ones(len(blocks)), requires_grad=False
          )
          self.dropout = nn.Dropout(block_dropout_prob)
  
      self.supported_residuals = ["sum", "conv"]
      if residual_mode not in self.supported_residuals:
          raise ValueError(
              f"Got non-supported residual mode: {residual_mode}. Supported values are {self.supported_residuals}."
          )
      self.residual_mode = residual_mode
  
      if residual_mode == "conv":
          if in_filters is None or out_filters is None:
              raise ValueError(
                  "in_filters and out_filters have to be specified when using 'conv' residual mode."
              )
          self.res_conv = MaskedConv1d(
              in_filters,
              out_filters,
              kernel_size=1,
              bias=False,
              use_mask=True,
          )
  
imports: import math
  from typing import Callable, Iterable, List, Optional, Tuple
  import torch
  import torch.nn
  import torch.nn.functional
  from torch import Tensor
  from torch.nn.init import _calculate_correct_fan
  from torch.nn.modules.utils import _single
  from nemo.collections.common.parts.utils import activation_registry
  from nemo.core.classes.mixins import AccessMixin
  from nemo.core.classes.mixins.adapter_mixins import AdapterModuleMixin
  from nemo.utils import logging
label_desc: Use image node_id 1 to create a new ParallelBlock object from inherited base classes: nn with example: obj = ParallelBlock(blocks, aggregation_mode, block_dropout_prob, residual_mode, in_filters, out_filters)