class_docstr: An implementation of the speaker embedding model in a paper.
  "ECAPA-TDNN: Emphasized Channel Attention, Propagation and Aggregation in
  TDNN Based Speaker Verification" (https://arxiv.org/abs/2005.07143).
  
  Arguments
  ---------
  device : str
      Device used, e.g., "cpu" or "cuda".
  activation : torch class
      A class for constructing the activation layers.
  channels : list of ints
      Output channels for TDNN/SERes2Net layer.
  kernel_sizes : list of ints
      List of kernel sizes for each layer.
  dilations : list of ints
      List of dilations for kernels in each layer.
  lin_neurons : int
      Number of neurons in linear layers.
  groups : list of ints
      List of groups for kernels in each layer.
  
  Example
  -------
  >>> input_feats = torch.rand([5, 120, 80])
  >>> compute_embedding = ECAPA_TDNN(80, lin_neurons=192)
  >>> outputs = compute_embedding(input_feats)
  >>> outputs.shape
  torch.Size([5, 1, 192])
docstr: Returns the embedding vector.
  
  Arguments
  ---------
  x : torch.Tensor
      Tensor of shape (batch, time, channel).
docstr_tok: ["Returns","the","embedding","vector",".","Arguments","--","--","--","--","-","x",":","torch.Tensor","Tensor","of","shape","(","batch",",","time",",","channel",")","."]
code: def forward(self, x, lengths=None):
      """Returns the embedding vector.
  
      Arguments
      ---------
      x : torch.Tensor
          Tensor of shape (batch, time, channel).
      """
      # Minimize transpose for efficiency
      x = x.transpose(1, 2)
  
      xl = []
      for layer in self.blocks:
          try:
              x = layer(x, lengths=lengths)
          except TypeError:
              x = layer(x)
          xl.append(x)
  
      # Multi-layer feature aggregation
      x = torch.cat(xl[1:], dim=1)
      x = self.mfa(x)
  
      # Attentive Statistical Pooling
      x = self.asp(x, lengths=lengths)
      x = self.asp_bn(x)
  
      # Final linear transformation
      x = self.fc(x)
  
      x = x.transpose(1, 2)
      return x
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from speechbrain.dataio.dataio import length_to_mask
  from speechbrain.nnet.CNN import Conv1d
  from speechbrain.nnet.normalization import BatchNorm1d
  from speechbrain.nnet.linear import Linear
label_desc: Use image node_id 2 for calling the ECAPA_TDNN obj's underlying member method code with example usage: obj.forward(x, lengths) and returns: x