docstr: Initialize the states required for incremental decoding
  
  Returns
  -------
  init_key
      - layout = 'NT'
          Shape (batch_size, 0, N, C_key)
      - layout = 'TN'
          Shape (0, batch_size, N, C_key)
  
  init_value
      - layout = 'NT'
          Shape (batch_size, 0, N, C_value)
      - layout = 'TN'
          Shape (0, batch_size, N, C_value)
docstr_tok: ["Initialize","the","states","required","for","incremental","decoding","Returns","--","--","--","-","init_key","-","layout","=","'NT'","Shape","(","batch_size",",","0",",","N",",","C_key",")","-","layout","=","'TN'","Shape","(","0",",","batch_size",",","N",",","C_key",")","init_value","-","layout","=","'NT'","Shape","(","batch_size",",","0",",","N",",","C_value",")","-","layout","=","'TN'","Shape","(","0",",","batch_size",",","N",",","C_value",")"]
code: def init_states(self, batch_size, ctx, dtype="float32"):
      """Initialize the states required for incremental decoding
  
      Returns
      -------
      init_key
          - layout = 'NT'
              Shape (batch_size, 0, N, C_key)
          - layout = 'TN'
              Shape (0, batch_size, N, C_key)
  
      init_value
          - layout = 'NT'
              Shape (batch_size, 0, N, C_value)
          - layout = 'TN'
              Shape (0, batch_size, N, C_value)
  
      """
      if self.layout == "NT":
          init_key = mx.np.zeros(
              shape=(
                  batch_size,
                  0,
                  self._num_heads,
                  self._units // self._num_heads,
              ),
              ctx=ctx,
              dtype=dtype,
          )
          init_value = mx.np.zeros(
              shape=(
                  batch_size,
                  0,
                  self._num_heads,
                  self._units // self._num_heads,
              ),
              ctx=ctx,
              dtype=dtype,
          )
      else:
          init_key = mx.np.zeros(
              shape=(
                  0,
                  batch_size,
                  self._num_heads,
                  self._units // self._num_heads,
              ),
              ctx=ctx,
              dtype=dtype,
          )
          init_value = mx.np.zeros(
              shape=(
                  0,
                  batch_size,
                  self._num_heads,
                  self._units // self._num_heads,
              ),
              ctx=ctx,
              dtype=dtype,
          )
      return init_key, init_value
  
imports: import numpy
  import mxnet
  from mxnet import np, npx
  from mxnet import use_np
  from mxnet.gluon import nn, HybridBlock
  from typing import Optional, Tuple, List
  from ..utils.registry import Registry
  from ..attention_cell import MultiHeadAttentionCell, gen_self_attn_mask, gen_mem_attn_mask
  from ..layers import PositionalEmbedding, PositionwiseFFN, InitializerType
  from ..utils.config import CfgNode
  from ..sequence_sampler import BaseStepDecoder
label_desc: Use image node_id 5 for calling the TransformerDecoderLayer obj's underlying member method code with example usage: obj.init_states(batch_size, ctx, dtype) and returns: init_key,  init_value