def Get(self, batchsize):
    """Reads data from disk.
    Args:
      batchsize: Number of data points to read.
    Returns:
      A list of numpy arrays each with batchsize rows. Each element of the list
      is one data modality.
    """
    assert self.num_data <= 2

    i = 0
    numdims = self.numdim_list[i]
    filename_list = self.filenames[i]
    num_files = self._num_file_list[i]
    current_file = (self.last_read_file[i] + 1) % num_files

    data_list = []
    boundaries = []
    datasize = [0]*self.num_data  # Number of rows of data filled up.
    for i in range(self.num_data):
      boundaries.append([])
      data_list.append(dh.np.zeros((batchsize, self.numdim_list[i]), dtype='float32'))

    # Read data from disk.
    while(datasize[0] < batchsize):
      if self.last_read_file[0] != current_file:
        if self.verbose:
          sys.stdout.write('\rLoading %s ...' % filename_list[current_file])
          sys.stdout.flush()
        this_chunk = self.LoadSequence(filename_list[current_file])
        self.last_read_chunk[0] = this_chunk
        self.last_read_file[0] = current_file
      else:
        this_chunk = self.last_read_chunk[0]
      is_full = False
      for i, d in enumerate(this_chunk):
        chunk_size = d.shape[0]
        if chunk_size + datasize[i] > batchsize:
          is_full = True
      if is_full:
        for i in range(len(this_chunk)):
          data_list[i] = data_list[i][:datasize[i]]
        break
      else:
        for i, d in enumerate(this_chunk):
          lw = self.left_window[i]
          rw = self.right_window[i]
          cs = d.shape[0]
          ds = datasize[i]
          data_list[i][ds : ds + cs] = d
          # if lw + rw > 0:
          #   valid_boundaries = range(ds + lw, ds + cs - rw)
          boundaries[i].append(cs)
          datasize[i] += cs
      current_file = (current_file + 1) % num_files
    if self.verbose:
      sys.stdout.write('\n')
    return data_list, boundaries
Reads data from disk.
    Args:
      batchsize: Number of data points to read.
    Returns:
      A list of numpy arrays each with batchsize rows. Each element of the list
      is one data modality.
    
deepnet/sequence_datahandler.py