class_docstr: Multi-headed attention.
  
  See "Attention Is All You Need" for more details.
class_docstr_tok: ["Multi-headed","attention",".","See","``","Attention","Is","All","You","Need","''","for","more","details","."]
docstr: Helper for getting incremental state for an nn.Module.
code: def get_incremental_state(
      self,
      incremental_state: Optional[
          Dict[str, Dict[str, Optional[Tensor]]]
      ],
      key: str,
  ) -> Optional[Dict[str, Optional[Tensor]]]:
      """Helper for getting incremental state for an nn.Module."""
      full_key = self._get_full_incremental_state_key(key)
      if incremental_state is None or full_key not in incremental_state:
          return None
      return incremental_state[full_key]
  
imports: import __init__
  import math
  import uuid
  from typing import Dict, Optional, List
  import torch
  from torch import Tensor, nn
  from torch.nn import Parameter, LayerNorm, Dropout
  from csrc.pytorch import util
  from csrc.pytorch.layer_base import TransformerEmbeddingLayerBase, TransformerEncoderLayerBase, TransformerDecoderLayerBase
  from csrc.pytorch.quantization import QuantLinear, TensorQuantizer, act_quant_config, weight_quant_config, out_quant_config, emb_quant_config
label_desc: Use image node_id 14 for calling the MultiheadAttention obj's underlying member method code with example usage: obj.get_incremental_state(incremental_state, key) and returns: incremental_state, None