docs: def _allocate_tensors(self):
          """ Allocates the tensors in the dataset. """
          # init tensors dict
          self._tensors = {}
  
          # allocate tensor for each data field
          for field_name, field_spec in self._config['fields'].items():
              # parse attributes
              field_dtype = np.dtype(field_spec['dtype'])
              
              # parse shape
              field_shape = [self._datapoints_per_file]
              if 'height' in field_spec.keys():
                  field_shape.append(field_spec['height'])
                  if 'width' in field_spec.keys():
                      field_shape.append(field_spec['width'])
                      if 'channels' in field_spec.keys():
                          field_shape.append(field_spec['channels'])
                          
              # create tensor
              self._tensors[field_name] = Tensor(field_shape, field_dtype)