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 guided attention mask.
  
  Examples:
      >>> guided_attn_mask =_make_guided_attention(5, 5, 0.4)
      >>> guided_attn_mask.shape
      torch.Size([5, 5])
      >>> guided_attn_mask
      tensor([[0.0000, 0.1175, 0.3935, 0.6753, 0.8647],
              [0.1175, 0.0000, 0.1175, 0.3935, 0.6753],
              [0.3935, 0.1175, 0.0000, 0.1175, 0.3935],
              [0.6753, 0.3935, 0.1175, 0.0000, 0.1175],
              [0.8647, 0.6753, 0.3935, 0.1175, 0.0000]])
      >>> guided_attn_mask =_make_guided_attention(3, 6, 0.4)
      >>> guided_attn_mask.shape
      torch.Size([6, 3])
      >>> guided_attn_mask
      tensor([[0.0000, 0.2934, 0.7506],
              [0.0831, 0.0831, 0.5422],
              [0.2934, 0.0000, 0.2934],
              [0.5422, 0.0831, 0.0831],
              [0.7506, 0.2934, 0.0000],
              [0.8858, 0.5422, 0.0831]])
docstr_tok: ["Make","guided","attention","mask",".","Examples",":",">",">",">","guided_attn_mask","=_make_guided_attention","(","5",",","5",",","0.4",")",">",">",">","guided_attn_mask.shape","torch.Size","(","[","5",",","5","]",")",">",">",">","guided_attn_mask","tensor","(","[","[","0.0000",",","0.1175",",","0.3935",",","0.6753",",","0.8647","]",",","[","0.1175",",","0.0000",",","0.1175",",","0.3935",",","0.6753","]",",","[","0.3935",",","0.1175",",","0.0000",",","0.1175",",","0.3935","]",",","[","0.6753",",","0.3935",",","0.1175",",","0.0000",",","0.1175","]",",","[","0.8647",",","0.6753",",","0.3935",",","0.1175",",","0.0000","]","]",")",">",">",">","guided_attn_mask","=_make_guided_attention","(","3",",","6",",","0.4",")",">",">",">","guided_attn_mask.shape","torch.Size","(","[","6",",","3","]",")",">",">",">","guided_attn_mask","tensor","(","[","[","0.0000",",","0.2934",",","0.7506","]",",","[","0.0831",",","0.0831",",","0.5422","]",",","[","0.2934",",","0.0000",",","0.2934","]",",","[","0.5422",",","0.0831",",","0.0831","]",",","[","0.7506",",","0.2934",",","0.0000","]",",","[","0.8858",",","0.5422",",","0.0831","]","]",")"]
code: def _make_guided_attention_mask(ilen, olen, sigma):
      """Make guided attention mask.
  
      Examples:
          >>> guided_attn_mask =_make_guided_attention(5, 5, 0.4)
          >>> guided_attn_mask.shape
          torch.Size([5, 5])
          >>> guided_attn_mask
          tensor([[0.0000, 0.1175, 0.3935, 0.6753, 0.8647],
                  [0.1175, 0.0000, 0.1175, 0.3935, 0.6753],
                  [0.3935, 0.1175, 0.0000, 0.1175, 0.3935],
                  [0.6753, 0.3935, 0.1175, 0.0000, 0.1175],
                  [0.8647, 0.6753, 0.3935, 0.1175, 0.0000]])
          >>> guided_attn_mask =_make_guided_attention(3, 6, 0.4)
          >>> guided_attn_mask.shape
          torch.Size([6, 3])
          >>> guided_attn_mask
          tensor([[0.0000, 0.2934, 0.7506],
                  [0.0831, 0.0831, 0.5422],
                  [0.2934, 0.0000, 0.2934],
                  [0.5422, 0.0831, 0.0831],
                  [0.7506, 0.2934, 0.0000],
                  [0.8858, 0.5422, 0.0831]])
  
      """
      grid_x, grid_y = torch.meshgrid(
          torch.arange(olen), torch.arange(ilen)
      )
      grid_x, grid_y = grid_x.float().to(
          olen.device
      ), grid_y.float().to(ilen.device)
      return 1.0 - torch.exp(
          -((grid_y / ilen - grid_x / olen) ** 2) / (2 * (sigma**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 5 for calling the GuidedAttentionLoss obj's underlying member method code with example usage: obj._make_guided_attention_mask(ilen, olen, sigma) and returns: unknown