docstr: Initialize the states required for incremental decoding
  
  Returns
  -------
  init_states
      - layout = 'NT'
          Shape (num_layers, 2, batch_size, 0, C_in)
      - layout = 'TN'
          Shape (num_layers, 2, 0, batch_size, C_in)
docstr_tok: ["Initialize","the","states","required","for","incremental","decoding","Returns","--","--","--","-","init_states","-","layout","=","'NT'","Shape","(","num_layers",",","2",",","batch_size",",","0",",","C_in",")","-","layout","=","'TN'","Shape","(","num_layers",",","2",",","0",",","batch_size",",","C_in",")"]
code: def init_states(self, batch_size, ctx, dtype=None):
      """Initialize the states required for incremental decoding
  
      Returns
      -------
      init_states
          - layout = 'NT'
              Shape (num_layers, 2, batch_size, 0, C_in)
          - layout = 'TN'
              Shape (num_layers, 2, 0, batch_size, C_in)
  
      """
      if dtype is None:
          dtype = self._dtype
      return (
          mx.np.zeros(
              shape=(self._num_layers, 2, batch_size, 0, self._units),
              ctx=ctx,
              dtype=dtype,
          )
          if self.layout == "NT"
          else mx.np.zeros(
              shape=(self._num_layers, 2, 0, batch_size, self._units),
              ctx=ctx,
              dtype=dtype,
          )
      )
  
imports: import os
  from typing import Tuple
  import mxnet
  from mxnet import use_np, np, npx
  from mxnet.gluon import HybridBlock, nn
  from .base import BACKBONE_REGISTRY
  from ..base import get_model_zoo_home_dir, get_repo_model_zoo_url, get_model_zoo_checksum_dir
  from ..utils.config import CfgNode
  from ..utils.misc import load_checksum_stats, download
  from ..utils.registry import Registry
  from ..initializer import TruncNorm
  from ..attention_cell import MultiHeadAttentionCell
  from ..layers import get_activation, PositionalEmbedding
  from ..data.tokenizers import HuggingFaceByteBPETokenizer
label_desc: Use image node_id 5 for calling the GPT2Model obj's underlying member method code with example usage: obj.init_states(batch_size, ctx, dtype) and returns: unknown