@classmethod<EOL><INDENT>def from_config(cls, config, weights=None, weights_loader=None):<DEDENT>
config = dict(config)<EOL>instance = cls(**config.pop('<STR_LIT>'))<EOL>instance.__dict__.update(config)<EOL>instance.network_weights = weights<EOL>instance.network_weights_loader = weights_loader<EOL>instance.prediction_cache = weakref.WeakKeyDictionary()<EOL>return instance<EOL>
deserialize from a dict returned by get_config().

Parameters
----------
config : dict
weights : list of array, optional
    Network weights to restore
weights_loader : callable, optional
    Function to call (no arguments) to load weights when needed

Returns
-------
Class1NeuralNetwork