docs: def from_config(cls, config, weights=None, weights_loader=None):
          """
          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
          """
          config = dict(config)
          instance = cls(**config.pop('hyperparameters'))
          instance.__dict__.update(config)
          instance.network_weights = weights
          instance.network_weights_loader = weights_loader
          instance.prediction_cache = weakref.WeakKeyDictionary()
          return instance