|View source on GitHub|
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
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)