class_docstr: Plot attention reporter.
  
  Args:
      att_vis_fn (espnet.nets.*_backend.e2e_asr.calculate_all_attentions):
          Function of attention visualization.
      data (list[tuple(str, dict[str, dict[str, Any]])]): List json utt key items.
      outdir (str): Directory to save figures.
      converter (espnet.asr.*_backend.asr.CustomConverter):
          CustomConverter object. Function to convert data.
      device (torch.device): The destination device to send tensor.
      reverse (bool): If True, input and output length are reversed.
class_docstr_tok: ["Plot","attention","reporter",".","Args",":","att_vis_fn","(","espnet.nets",".","*","_backend.e2e_asr.calculate_all_attentions",")",":","Function","of","attention","visualization",".","data","(","list","[","tuple","(","str",",","dict","[","str",",","dict","[","str",",","Any","]","]",")","]",")",":","List","json","utt","key","items",".","outdir","(","str",")",":","Directory","to","save","figures",".","converter","(","espnet.asr",".","*","_backend.asr.CustomConverter",")",":","CustomConverter","object",".","Function","to","convert","data",".","device","(","torch.device",")",":","The","destination","device","to","send","tensor",".","reverse","(","bool",")",":","If","True",",","input","and","output","length","are","reversed","."]
docstr: Return attention weights.
  
  Returns:
      arr_ws_sd (numpy.ndarray): attention weights. It's shape would be
          differ from bachend.dtype=float
          * pytorch-> 1) multi-head case => (B, H, Lmax, Tmax). 2)
            other case => (B, Lmax, Tmax).
          * chainer-> attention weights (B, Lmax, Tmax).
docstr_tok: ["Return","attention","weights",".","Returns",":","arr_ws_sd","(","numpy.ndarray",")",":","attention","weights",".","It","'s","shape","would","be","differ","from","bachend.dtype=float","*","pytorch-",">","1",")","multi-head","case","=",">","(","B",",","H",",","Lmax",",","Tmax",")",".","2",")","other","case","=",">","(","B",",","Lmax",",","Tmax",")",".","*","chainer-",">","attention","weights","(","B",",","Lmax",",","Tmax",")","."]
code: def get_attention_weights(self):
      """Return attention weights.
  
      Returns:
          arr_ws_sd (numpy.ndarray): attention weights. It's shape would be
              differ from bachend.dtype=float
              * pytorch-> 1) multi-head case => (B, H, Lmax, Tmax). 2)
                other case => (B, Lmax, Tmax).
              * chainer-> attention weights (B, Lmax, Tmax).
  
      """
      batch = self.converter(
          [self.converter.transform(self.data)], self.device
      )
      att_ws_sd = self.att_vis_fn(*batch)
      return att_ws_sd
  
file_path: espnet/espnet/asr/asr_mix_utils.py
imports: import copy
  import logging
  import os
  from chainer.training import extension
  from espnet.asr.asr_utils import parse_hypothesis
label_desc: Use image node_id 4 for calling the PlotAttentionReport obj's underlying member method code with example usage: obj.get_attention_weights() and returns: att_ws_sd