class_docstr: Variance predictor module.
  
  This is a module of variacne predictor described in `FastSpeech 2:
  Fast and High-Quality End-to-End Text to Speech`_.
  
  .. _`FastSpeech 2: Fast and High-Quality End-to-End Text to Speech`:
      https://arxiv.org/abs/2006.04558
docstr: Calculate forward propagation.
  
  Args:
      xs (Tensor): Batch of input sequences (B, Tmax, idim).
      x_masks (ByteTensor): Batch of masks indicating padded part (B, Tmax).
  
  Returns:
      Tensor: Batch of predicted sequences (B, Tmax, 1).
docstr_tok: ["Calculate","forward","propagation",".","Args",":","xs","(","Tensor",")",":","Batch","of","input","sequences","(","B",",","Tmax",",","idim",")",".","x_masks","(","ByteTensor",")",":","Batch","of","masks","indicating","padded","part","(","B",",","Tmax",")",".","Returns",":","Tensor",":","Batch","of","predicted","sequences","(","B",",","Tmax",",","1",")","."]
code: def forward(
      self, xs: torch.Tensor, x_masks: torch.Tensor = None
  ) -> torch.Tensor:
      """Calculate forward propagation.
  
      Args:
          xs (Tensor): Batch of input sequences (B, Tmax, idim).
          x_masks (ByteTensor): Batch of masks indicating padded part (B, Tmax).
  
      Returns:
          Tensor: Batch of predicted sequences (B, Tmax, 1).
  
      """
      xs = xs.transpose(1, -1)  # (B, idim, Tmax)
      for f in self.conv:
          xs = f(xs)  # (B, C, Tmax)
  
      xs = self.linear(xs.transpose(1, 2))  # (B, Tmax, 1)
  
      if x_masks is not None:
          xs = xs.masked_fill(x_masks, 0.0)
  
      return xs
  
imports: import torch
  from typeguard import check_argument_types
  from espnet.nets.pytorch_backend.transformer.layer_norm import LayerNorm
label_desc: Use image node_id 2 for calling the VariancePredictor obj's underlying member method code with example usage: obj.forward(xs, x_masks) and returns: xs