def from_config(cls, config, custom_objects=None): from tensorflow.python.keras._impl.keras.layers import deserialize as deserialize_layer # pylint: disable=g-import-not-at-top layer = deserialize_layer( config.pop('layer'), custom_objects=custom_objects) return cls(layer, **config)
def from_config(cls, config, custom_objects=None): from tensorflow.python.keras._impl.keras.layers import deserialize as deserialize_layer # pylint: disable=g-import-not-at-top layer = deserialize_layer(config.pop('layer'), custom_objects=custom_objects) return cls(layer, **config)