class_docstr: DataLoaderAdapter converts Aeon data buffers to tensors.
  
  Arguments:
      dataloader (DataLoader): Aeon dataloading module.
code: def __init__(self, dataloader):
      super(DataLoaderAdapter, self).__init__(dataloader, None)
  
      self.shape = self.shapes()[0]
      self.nbatches, modal = divmod(self.dataloader.ndata, self.be.bsz)
      if modal > 0:
          self.nbatches += 1
      self.outputs = OrderedDict()  # Create output buffers
  
      def max_dur(val, freq):
          uval = float(val.split(" ")[0])
          ucat = val.split(" ")[1]
          if ucat == "samples":
              return float(uval)
          elif ucat == "seconds":
              return float(uval * freq)
          elif ucat == "milliseconds":
              return float(uval / 1000 * freq)
          else:
              raise ValueError("Unknown time unit " + ucat)
  
      # Convert max duration value for audio from Aeon format
      for conf in self.dataloader.config["etl"]:
          if conf["type"] == "audio":
              self.max_duration = max_dur(
                  conf["max_duration"], conf["sample_freq_hz"]
              )
  
file_path: neon/neon/data/dataloaderadapter.py
imports: from __future__ import division
  import numpy
  from neon.data.dataloader_transformers import DataLoaderTransformer
  from collections import OrderedDict
label_desc: Use image node_id 1 to create a new DataLoaderAdapter object from inherited base classes: DataLoaderTransformer with example: obj = DataLoaderAdapter(dataloader)