class_docstr: DataLoaderAdapter converts Aeon data buffers to tensors.
  
  Arguments:
      dataloader (DataLoader): Aeon dataloading module.
docstr: Converts Aeon data to tuple of tensors.
  
  Arguments:
      t (tuple): Tuple of numpy arrays.
          For example: {tuple}{'image':ndarray(...), 'label':ndarray(...)}
          where 'image' shape is (N,C,H,W) and 'label' shape is (N,1)
code: def transform(self, t):
      """
      Converts Aeon data to tuple of tensors.
  
      Arguments:
          t (tuple): Tuple of numpy arrays.
              For example: {tuple}{'image':ndarray(...), 'label':ndarray(...)}
              where 'image' shape is (N,C,H,W) and 'label' shape is (N,1)
      """
      for key, value in t:
          assert value.shape[0] == self.be.bsz
  
          reshape_rows = self.be.bsz
  
          # Convert audio length from absolute to percentage
          if key == "audio_length":
              for x in np.nditer(value, op_flags=["readwrite"]):
                  x[...] = x / self.max_duration * 100
              value = value.astype(np.uint8, copy=False)
  
          if key == "char_map":
              x = value
              x = x[x != 0]
              x = np.reshape(x, (1, -1))
              x = np.ascontiguousarray(
                  x
              )  # Contigious array needed for GPU backend
          else:
              # Adjust Aeon data layout to Neon layout, e.g. shape (N,C,H,W) -> (N,C*H*W)
              x = np.reshape(value, (reshape_rows, -1))
              x = np.ascontiguousarray(
                  x.T
              )  # Contigious array needed for GPU backend
  
          # Patch that forces the numpy array into C order to fix the strides for NumPy > 1.11.1
          x = np.array(x, order="C")
  
          # Create tensor
          self.outputs[key] = self.be.array(x, dtype=value.dtype)
  
      return tuple(self.outputs.values())
  
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 2 for calling the DataLoaderAdapter obj's underlying member method code with example usage: obj.transform(t) and returns: tuple