Regardez les keynotes, les sessions sur les produits, les ateliers et bien plus à partir de Google I / O Voir la playlist


Provides a scope in which Clustered layers and models can be deserialized.

Used in the notebooks

Used in the guide

If a keras model or layer has been clustered, it needs to be within this scope to be successfully deserialized.

Object of type CustomObjectScope with clustering objects included.


clustered_model = cluster_weights(model, **self.params)
keras.models.save_model(clustered_model, keras_file)

with cluster_scope():
  loaded_model = keras.models.load_model(keras_file)