docstr: Generates input examples for tracing etc.
  Returns:
      A tuple of input examples.
docstr_tok: ["Generates","input","examples","for","tracing","etc",".","Returns",":","A","tuple","of","input","examples","."]
code: def input_example(self, max_batch=1, max_dim=256):
      """
      Generates input examples for tracing etc.
      Returns:
          A tuple of input examples.
      """
      sample = next(self.parameters())
      sz = (max_batch, max_dim)
      input_ids = torch.randint(
          low=0, high=2048, size=sz, device=sample.device
      )
      encoder_mask = torch.randint(
          low=0, high=1, size=sz, device=sample.device
      )
      mem_size = [
          max_batch,
          self.num_states,
          max_dim - 1,
          self._hidden_size,
      ]
      decoder_mems = torch.rand(mem_size, device=sample.device)
      return tuple(
          [
              input_ids,
              encoder_mask,
              self._embedding(input_ids),
              encoder_mask,
              decoder_mems,
          ]
      )
  
imports: from dataclasses import dataclass
  from typing import Dict, Optional
  import torch
  from omegaconf.omegaconf import MISSING
  from nemo.collections.nlp.modules.common.decoder_module import DecoderModule
  from nemo.collections.nlp.modules.common.encoder_module import EncoderModule
  from nemo.collections.nlp.modules.common.transformer.transformer_decoders import TransformerDecoder
  from nemo.collections.nlp.modules.common.transformer.transformer_encoders import TransformerEncoder
  from nemo.collections.nlp.modules.common.transformer.transformer_modules import TransformerEmbedding
  from nemo.core.classes.common import typecheck
  from nemo.core.classes.exportable import Exportable
  from nemo.core.neural_types import ChannelType, NeuralType
label_desc: Use image node_id 8 for calling the TransformerDecoderNM obj's underlying member method code with example usage: obj.input_example(max_batch, max_dim) and returns: tuple