class_docstr: CTC-based grapheme-to-phoneme model.
class_docstr_tok: ["CTC-based","grapheme-to-phoneme","model","."]
docstr: Setup function for a infer data loader.
  Returns:
      A pytorch DataLoader.
docstr_tok: ["Setup","function","for","a","infer","data","loader",".","Returns",":","A","pytorch","DataLoader","."]
code: def _setup_infer_dataloader(
      self, cfg: DictConfig
  ) -> "torch.utils.data.DataLoader":
      """
      Setup function for a infer data loader.
      Returns:
          A pytorch DataLoader.
      """
      dataset = CTCG2PBPEDataset(
          manifest_filepath=cfg.manifest_filepath,
          grapheme_field=cfg.grapheme_field,
          tokenizer_graphemes=self.tokenizer_grapheme,
          tokenizer_phonemes=self.tokenizer,
          do_lower=self._cfg.tokenizer_grapheme.do_lower,
          labels=self.vocabulary,
          max_source_len=self._cfg.max_source_len,
          with_labels=False,
      )
  
      return torch.utils.data.DataLoader(
          dataset,
          collate_fn=dataset.collate_fn,
          batch_size=cfg.batch_size,
          shuffle=False,
          num_workers=cfg.num_workers,
          drop_last=False,
      )
  
imports: import os
  import string
  from dataclasses import dataclass
  from typing import Any, Dict, List, Optional, Union
  import torch
  from hydra.utils import instantiate
  from omegaconf import DictConfig, ListConfig, OmegaConf, open_dict
  from pytorch_lightning import Trainer
  from transformers import AutoConfig, AutoModel, AutoTokenizer
  from nemo.collections.tts.g2p.data.ctc import CTCG2PBPEDataset
  from nemo.collections.tts.models.base import G2PModel
  from nemo.core.classes.common import PretrainedModelInfo
  from nemo.utils import logging
label_desc: Use image node_id 11 for calling the CTCG2PModel obj's underlying member method code with example usage: obj._setup_infer_dataloader(cfg) and returns: torch