(cls, cdict, model, data=[])
return callbacks
Load callbacks.
Load callbacks.
Load callbacks .
def load_callbacks(cls, cdict, model, data=[]):
        """
        Load callbacks.
        """
        if type(native(cdict)) is str:
            cdict = load_obj(cdict)
        callbacks = cls(model, output_file=cdict['output_file'])
        callbacks.epoch_marker = cdict['epoch_marker']
        callbacks.callbacks = []
        for cb in cdict['callbacks']:
            module = load_class(cb['type'])
            callbacks.callbacks.append(module(**cb['config']))
        return callbacks
def load_callbacks ( cls , cdict , model , data = [ ] ) : if type ( native ( cdict ) ) is str : cdict = load_obj ( cdict ) callbacks = cls ( model , output_file = cdict [ 'output_file' ] ) callbacks . epoch_marker = cdict [ 'epoch_marker' ] callbacks . callbacks = [ ] for cb in cdict [ 'callbacks' ] : module = load_class ( cb [ 'type' ] ) callbacks . callbacks . append ( module ( * * cb [ 'config' ] ) ) return callbacks