class_docstr: Guided attention loss function module.
  
  This module calculates the guided attention loss described
  in `Efficiently Trainable Text-to-Speech System Based
  on Deep Convolutional Networks with Guided Attention`_,
  which forces the attention to be diagonal.
  
  .. _`Efficiently Trainable Text-to-Speech System
      Based on Deep Convolutional Networks with Guided Attention`:
      https://arxiv.org/abs/1710.08969
class_docstr_tok: ["Guided","attention","loss","function","module",".","This","module","calculates","the","guided","attention","loss","described","in","`","Efficiently","Trainable","Text-to-Speech","System","Based","on","Deep","Convolutional","Networks","with","Guided","Attention","`","_",",","which","forces","the","attention","to","be","diagonal",".","..","_","`","Efficiently","Trainable","Text-to-Speech","System","Based","on","Deep","Convolutional","Networks","with","Guided","Attention","`",":","https",":","\/\/arxiv.org\/abs\/1710.08969"]
docstr: Make masks indicating non-padded part.
  
  Args:
      ilens (LongTensor or List): Batch of lengths (B,).
      olens (LongTensor or List): Batch of lengths (B,).
  
  Returns:
      Tensor: Mask tensor indicating non-padded part.
              dtype=torch.uint8 in PyTorch 1.2-
              dtype=torch.bool in PyTorch 1.2+ (including 1.2)
  
  Examples:
      >>> ilens, olens = [5, 2], [8, 5]
      >>> _make_mask(ilens, olens)
      tensor([[[1, 1, 1, 1, 1],
               [1, 1, 1, 1, 1],
               [1, 1, 1, 1, 1],
               [1, 1, 1, 1, 1],
               [1, 1, 1, 1, 1],
               [1, 1, 1, 1, 1],
               [1, 1, 1, 1, 1],
               [1, 1, 1, 1, 1]],
              [[1, 1, 0, 0, 0],
               [1, 1, 0, 0, 0],
               [1, 1, 0, 0, 0],
               [1, 1, 0, 0, 0],
               [1, 1, 0, 0, 0],
               [0, 0, 0, 0, 0],
               [0, 0, 0, 0, 0],
               [0, 0, 0, 0, 0]]], dtype=torch.uint8)
docstr_tok: ["Make","masks","indicating","non-padded","part",".","Args",":","ilens","(","LongTensor","or","List",")",":","Batch","of","lengths","(","B",",",")",".","olens","(","LongTensor","or","List",")",":","Batch","of","lengths","(","B",",",")",".","Returns",":","Tensor",":","Mask","tensor","indicating","non-padded","part",".","dtype=torch.uint8","in","PyTorch","1.2-","dtype=torch.bool","in","PyTorch","1.2+","(","including","1.2",")","Examples",":",">",">",">","ilens",",","olens","=","[","5",",","2","]",",","[","8",",","5","]",">",">",">","_make_mask","(","ilens",",","olens",")","tensor","(","[","[","[","1",",","1",",","1",",","1",",","1","]",",","[","1",",","1",",","1",",","1",",","1","]",",","[","1",",","1",",","1",",","1",",","1","]",",","[","1",",","1",",","1",",","1",",","1","]",",","[","1",",","1",",","1",",","1",",","1","]",",","[","1",",","1",",","1",",","1",",","1","]",",","[","1",",","1",",","1",",","1",",","1","]",",","[","1",",","1",",","1",",","1",",","1","]","]",",","[","[","1",",","1",",","0",",","0",",","0","]",",","[","1",",","1",",","0",",","0",",","0","]",",","[","1",",","1",",","0",",","0",",","0","]",",","[","1",",","1",",","0",",","0",",","0","]",",","[","1",",","1",",","0",",","0",",","0","]",",","[","0",",","0",",","0",",","0",",","0","]",",","[","0",",","0",",","0",",","0",",","0","]",",","[","0",",","0",",","0",",","0",",","0","]","]","]",",","dtype=torch.uint8",")"]
code: def _make_masks(ilens, olens):
      """Make masks indicating non-padded part.
  
      Args:
          ilens (LongTensor or List): Batch of lengths (B,).
          olens (LongTensor or List): Batch of lengths (B,).
  
      Returns:
          Tensor: Mask tensor indicating non-padded part.
                  dtype=torch.uint8 in PyTorch 1.2-
                  dtype=torch.bool in PyTorch 1.2+ (including 1.2)
  
      Examples:
          >>> ilens, olens = [5, 2], [8, 5]
          >>> _make_mask(ilens, olens)
          tensor([[[1, 1, 1, 1, 1],
                   [1, 1, 1, 1, 1],
                   [1, 1, 1, 1, 1],
                   [1, 1, 1, 1, 1],
                   [1, 1, 1, 1, 1],
                   [1, 1, 1, 1, 1],
                   [1, 1, 1, 1, 1],
                   [1, 1, 1, 1, 1]],
                  [[1, 1, 0, 0, 0],
                   [1, 1, 0, 0, 0],
                   [1, 1, 0, 0, 0],
                   [1, 1, 0, 0, 0],
                   [1, 1, 0, 0, 0],
                   [0, 0, 0, 0, 0],
                   [0, 0, 0, 0, 0],
                   [0, 0, 0, 0, 0]]], dtype=torch.uint8)
  
      """
      in_masks = make_non_pad_mask(ilens)  # (B, T_in)
      out_masks = make_non_pad_mask(olens)  # (B, T_out)
      return out_masks.unsqueeze(-1) & in_masks.unsqueeze(-2)
  
imports: import logging
  import numpy
  import torch
  import torch.nn.functional
  from espnet.nets.pytorch_backend.nets_utils import make_non_pad_mask
  from espnet.nets.pytorch_backend.rnn.attentions import AttForward, AttForwardTA, AttLoc
  from espnet.nets.pytorch_backend.tacotron2.cbhg import CBHG, CBHGLoss
  from espnet.nets.pytorch_backend.tacotron2.decoder import Decoder
  from espnet.nets.pytorch_backend.tacotron2.encoder import Encoder
  from espnet.nets.tts_interface import TTSInterface
  from espnet.utils.cli_utils import strtobool
  from espnet.utils.fill_missing_args import fill_missing_args
label_desc: Use image node_id 6 for calling the GuidedAttentionLoss obj's underlying member method code with example usage: obj._make_masks(ilens, olens) and returns: unknown