class_docstr: RelPositionMultiHeadedAttention definition.
  
  Args:
      num_heads: Number of attention heads.
      embed_size: Embedding size.
      dropout_rate: Dropout rate.
docstr: Simplified attention score computation.
  
  Reference: https://github.com/k2-fsa/icefall/pull/458
  
  Args:
      query: Transformed query tensor. (B, H, T_1, d_k)
      key: Transformed key tensor. (B, H, T_2, d_k)
      pos_enc: Positional embedding tensor. (B, 2 * T_1 - 1, size)
      left_context: Number of previous frames to use for current chunk
                    attention computation.
  
  Returns:
      : Attention score. (B, H, T_1, T_2)
code: def compute_simplified_attention_score(
      self,
      query: torch.Tensor,
      key: torch.Tensor,
      pos_enc: torch.Tensor,
      left_context: int = 0,
  ) -> torch.Tensor:
      """Simplified attention score computation.
  
      Reference: https://github.com/k2-fsa/icefall/pull/458
  
      Args:
          query: Transformed query tensor. (B, H, T_1, d_k)
          key: Transformed key tensor. (B, H, T_2, d_k)
          pos_enc: Positional embedding tensor. (B, 2 * T_1 - 1, size)
          left_context: Number of previous frames to use for current chunk
                        attention computation.
  
      Returns:
          : Attention score. (B, H, T_1, T_2)
  
      """
      pos_enc = self.linear_pos(pos_enc)
  
      matrix_ac = torch.matmul(query, key.transpose(2, 3))
  
      matrix_bd = self.rel_shift(
          pos_enc.transpose(1, 2)
          .unsqueeze(2)
          .repeat(1, 1, query.size(2), 1),
          left_context=left_context,
      )
  
      return (matrix_ac + matrix_bd) / math.sqrt(self.d_k)
  
file_path: espnet/espnet2/asr_transducer/encoder/modules/attention.py
imports: import math
  from typing import Optional, Tuple
  import torch
label_desc: Use image node_id 3 for calling the RelPositionMultiHeadedAttention obj's underlying member method code with example usage: obj.compute_simplified_attention_score(query, key, pos_enc, left_context) and returns: unknown