'Load callbacks.'

@classmethod
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
