def __init__(self, item_list=None, batch_size=64, buffer_size=None, data_processing_chain=None, meta_processing_chain=None, data_processing_chain_callback_on_epoch_end=None, meta_processing_chain_callback_on_epoch_end=None, transformer_callbacks=None, refresh_buffer_on_epoch=False, data_format='channels_last', target_format='single_target_per_sequence', **kwargs):
    "Constructor\n\n            Parameters\n            ----------\n            item_list : list or dict\n                Items in the data sequence. List containing multi-level dictionary with first level key\n                'data' and 'meta'. Second level should contain parameters for process method in the processing chain.\n                Default value None\n\n            batch_size : int\n                Batch size (item count).\n                Default value 64\n\n            buffer_size : int\n                Internal buffer size (item count). By setting this sufficiently high, data sequence generator can\n                possibly fit all sequence items into internal buffer and can fetch without loading from disk.\n                Set to None, if no internal buffer used.\n                Default value None\n\n            data_processing_chain : ProcessingChain\n                Data processing chain.\n                Default value None\n\n            meta_processing_chain : ProcessingChain\n                Meta processing chain.\n                Default value None\n\n            data_processing_chain_callback_on_epoch_end : list of dict\n                Can be used to call methods with parameters for processing chain at the end of epoch. This can be\n                used to control processing chain's internal status (e.g. roll the data).\n                Default value None\n\n            meta_processing_chain_callback_on_epoch_end : list of dict\n                Can be used to call methods with parameters for processing chain at the end of epoch. This can be\n                used to control processing chain's internal status (e.g. roll the data).\n                Default value None\n\n            transformer_callbacks : list of func\n                Transformer callbacks to jointly process data and meta. This can be used for local data modification and\n                data augmentation.\n                Default value None\n\n            refresh_buffer_on_epoch : bool\n                In case internal data buffer is used, force data and meta refresh at the end of each epoch. Use this if\n                data is modified/augmented differently for each epoch.\n                In case data_processing_chain_callback_on_epoch_end or meta_processing_chain_callback_on_epoch_end is\n                used, this parameter is automatically set to True.\n                Default value False\n\n            data_format : str\n                Keras like data format, controls where channel should be added.\n                Possible values ['channels_first', 'channels_last']\n                Default value 'channels_last'\n\n            target_format : str\n                Meta data interpretation in the relation to the data items.\n                Default value 'single_target_per_segment'\n\n            "
    ContainerMixin.__init__(self, **kwargs)
    self._data_shape = None
    self._data_axis = None
    self.item_list = copy.copy(item_list)
    self.batch_size = batch_size
    self.buffer_size = buffer_size
    self.data_refresh_on_epoch = refresh_buffer_on_epoch
    if (data_format is None):
        data_format = 'channels_last'
    self.data_format = data_format
    if (self.data_format not in ['channels_first', 'channels_last']):
        message = '{name}: Unknown data_format [{data_format}].'.format(name=self.__class__.__name__, data_format=self.data_format)
        self.logger.exception(message)
        raise NotImplementedError(message)
    if (target_format is None):
        target_format = 'single_target_per_sequence'
    self.target_format = target_format
    if (self.target_format not in ['same', 'single_target_per_sequence']):
        message = '{name}: Unknown target_format [{target_format}].'.format(name=self.__class__.__name__, target_format=self.target_format)
        self.logger.exception(message)
        raise NotImplementedError(message)
    if (data_processing_chain_callback_on_epoch_end is None):
        data_processing_chain_callback_on_epoch_end = []
    self.data_processing_chain_callback_on_epoch_end = data_processing_chain_callback_on_epoch_end
    if self.data_processing_chain_callback_on_epoch_end:
        self.data_refresh_on_epoch = True
    if (meta_processing_chain_callback_on_epoch_end is None):
        meta_processing_chain_callback_on_epoch_end = []
    self.meta_processing_chain_callback_on_epoch_end = meta_processing_chain_callback_on_epoch_end
    if (transformer_callbacks is None):
        transformer_callbacks = []
    self.transformer_callbacks = transformer_callbacks
    self.data_processing_chain = data_processing_chain
    self.meta_processing_chain = meta_processing_chain
    if (self.buffer_size is not None):
        self.data_buffer = DataBuffer(size=self.buffer_size)
    else:
        self.data_buffer = None
Constructor

Parameters
----------
item_list : list or dict
    Items in the data sequence. List containing multi-level dictionary with first level key
    'data' and 'meta'. Second level should contain parameters for process method in the processing chain.
    Default value None

batch_size : int
    Batch size (item count).
    Default value 64

buffer_size : int
    Internal buffer size (item count). By setting this sufficiently high, data sequence generator can
    possibly fit all sequence items into internal buffer and can fetch without loading from disk.
    Set to None, if no internal buffer used.
    Default value None

data_processing_chain : ProcessingChain
    Data processing chain.
    Default value None

meta_processing_chain : ProcessingChain
    Meta processing chain.
    Default value None

data_processing_chain_callback_on_epoch_end : list of dict
    Can be used to call methods with parameters for processing chain at the end of epoch. This can be
    used to control processing chain's internal status (e.g. roll the data).
    Default value None

meta_processing_chain_callback_on_epoch_end : list of dict
    Can be used to call methods with parameters for processing chain at the end of epoch. This can be
    used to control processing chain's internal status (e.g. roll the data).
    Default value None

transformer_callbacks : list of func
    Transformer callbacks to jointly process data and meta. This can be used for local data modification and
    data augmentation.
    Default value None

refresh_buffer_on_epoch : bool
    In case internal data buffer is used, force data and meta refresh at the end of each epoch. Use this if
    data is modified/augmented differently for each epoch.
    In case data_processing_chain_callback_on_epoch_end or meta_processing_chain_callback_on_epoch_end is
    used, this parameter is automatically set to True.
    Default value False

data_format : str
    Keras like data format, controls where channel should be added.
    Possible values ['channels_first', 'channels_last']
    Default value 'channels_last'

target_format : str
    Meta data interpretation in the relation to the data items.
    Default value 'single_target_per_segment'
def __init__(self, item_list=None, batch_size=64, buffer_size=None, data_processing_chain=None, meta_processing_chain=None, data_processing_chain_callback_on_epoch_end=None, meta_processing_chain_callback_on_epoch_end=None, transformer_callbacks=None, refresh_buffer_on_epoch=False, data_format='channels_last', target_format='single_target_per_sequence', **kwargs):
    "Constructor\n\n            Parameters\n            ----------\n            item_list : list or dict\n                Items in the data sequence. List containing multi-level dictionary with first level key\n                'data' and 'meta'. Second level should contain parameters for process method in the processing chain.\n                Default value None\n\n            batch_size : int\n                Batch size (item count).\n                Default value 64\n\n            buffer_size : int\n                Internal buffer size (item count). By setting this sufficiently high, data sequence generator can\n                possibly fit all sequence items into internal buffer and can fetch without loading from disk.\n                Set to None, if no internal buffer used.\n                Default value None\n\n            data_processing_chain : ProcessingChain\n                Data processing chain.\n                Default value None\n\n            meta_processing_chain : ProcessingChain\n                Meta processing chain.\n                Default value None\n\n            data_processing_chain_callback_on_epoch_end : list of dict\n                Can be used to call methods with parameters for processing chain at the end of epoch. This can be\n                used to control processing chain's internal status (e.g. roll the data).\n                Default value None\n\n            meta_processing_chain_callback_on_epoch_end : list of dict\n                Can be used to call methods with parameters for processing chain at the end of epoch. This can be\n                used to control processing chain's internal status (e.g. roll the data).\n                Default value None\n\n            transformer_callbacks : list of func\n                Transformer callbacks to jointly process data and meta. This can be used for local data modification and\n                data augmentation.\n                Default value None\n\n            refresh_buffer_on_epoch : bool\n                In case internal data buffer is used, force data and meta refresh at the end of each epoch. Use this if\n                data is modified/augmented differently for each epoch.\n                In case data_processing_chain_callback_on_epoch_end or meta_processing_chain_callback_on_epoch_end is\n                used, this parameter is automatically set to True.\n                Default value False\n\n            data_format : str\n                Keras like data format, controls where channel should be added.\n                Possible values ['channels_first', 'channels_last']\n                Default value 'channels_last'\n\n            target_format : str\n                Meta data interpretation in the relation to the data items.\n                Default value 'single_target_per_segment'\n\n            "
    ContainerMixin.__init__(self, **kwargs)
    self._data_shape = None
    self._data_axis = None
    self.item_list = copy.copy(item_list)
    self.batch_size = batch_size
    self.buffer_size = buffer_size
    self.data_refresh_on_epoch = refresh_buffer_on_epoch
    if (data_format is None):
        data_format = 'channels_last'
    self.data_format = data_format
    if (self.data_format not in ['channels_first', 'channels_last']):
        message = '{name}: Unknown data_format [{data_format}].'.format(name=self.__class__.__name__, data_format=self.data_format)
        self.logger.exception(message)
        raise NotImplementedError(message)
    if (target_format is None):
        target_format = 'single_target_per_sequence'
    self.target_format = target_format
    if (self.target_format not in ['same', 'single_target_per_sequence']):
        message = '{name}: Unknown target_format [{target_format}].'.format(name=self.__class__.__name__, target_format=self.target_format)
        self.logger.exception(message)
        raise NotImplementedError(message)
    if (data_processing_chain_callback_on_epoch_end is None):
        data_processing_chain_callback_on_epoch_end = []
    self.data_processing_chain_callback_on_epoch_end = data_processing_chain_callback_on_epoch_end
    if self.data_processing_chain_callback_on_epoch_end:
        self.data_refresh_on_epoch = True
    if (meta_processing_chain_callback_on_epoch_end is None):
        meta_processing_chain_callback_on_epoch_end = []
    self.meta_processing_chain_callback_on_epoch_end = meta_processing_chain_callback_on_epoch_end
    if (transformer_callbacks is None):
        transformer_callbacks = []
    self.transformer_callbacks = transformer_callbacks
    self.data_processing_chain = data_processing_chain
    self.meta_processing_chain = meta_processing_chain
    if (self.buffer_size is not None):
        self.data_buffer = DataBuffer(size=self.buffer_size)
    else:
        self.data_buffer = None