code: def build_dataloader(
      config,
      manifest_root,
      batch_size,
      subset_pct=100,
      PIXEL_MEANS=np.array([104, 117, 123]),
  ):
      """
      Builds the dataloader for the Faster-RCNN network using our aeon loader.
      Besides, the base loader, we add several operations:
      1. Cast the image data into float32 format
      2. Subtract the BGRMean from the image. We used pre-defined means from training
         the VGG network.
      3. Repack the data for Faster-RCNN model. This model has several nested branches, so
         The buffers have to repacked into nested tuples to match the branch leafs. Additionally,
         buffers for training the RCNN portion of the model are also allocated and provisioned
         to the model.
  
      Arguments:
          config (dict): dataloader configuration
          be (backend): compute backend
  
      Returns:
          dataloader object.
      """
      # assert config['minibatch_size'] == be.bsz,
      # 'Dataloader config\'s minibatch size not matching backend bsz'
      config["manifest_root"] = manifest_root
      config["batch_size"] = batch_size
      config["subset_fraction"] = float(subset_pct / 100.0)
  
      dl = DataLoaderAdapter(DataLoader(config))
      dl = TypeCast(
          dl, index=5, dtype=np.float32
      )  # cast image to float
  
      dl = BGRMeanSubtract(
          dl, index=5, pixel_mean=PIXEL_MEANS
      )  # subtract means
      dl = ObjectLocalization(dl)
      dl.set_classes(config["etl"][0]["class_names"])
      dl.shape = dl.shapes()[5]
      return dl
  
file_path: neon/examples/ssd/ssd_dataloader.py
imports: import numpy
  from neon.data.dataloader_transformers import DataLoaderTransformer
  from neon.data.dataloader_transformers import TypeCast, BGRMeanSubtract
  from aeon import DataLoader
  from neon.data.dataloaderadapter import DataLoaderAdapter
label_desc: Use image node_id 1 for calling a global function with example usage: build_dataloader(config, manifest_root, batch_size, subset_pct, PIXEL_MEANS) and returns: dl