From c97a04a2477ed893b8ab3a6ae319acd3bee8583a Mon Sep 17 00:00:00 2001 From: Andrew Ho Date: Sat, 13 Mar 2021 22:35:43 +0800 Subject: [PATCH 1/2] [Clustering] Fix error message in clustering_registry.py Fix typo and spacing for get_clustering_impl() --- .../python/core/clustering/keras/clustering_registry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tensorflow_model_optimization/python/core/clustering/keras/clustering_registry.py b/tensorflow_model_optimization/python/core/clustering/keras/clustering_registry.py index e36ae8f56..14f0f14e6 100644 --- a/tensorflow_model_optimization/python/core/clustering/keras/clustering_registry.py +++ b/tensorflow_model_optimization/python/core/clustering/keras/clustering_registry.py @@ -231,7 +231,7 @@ def get_clustering_impl(cls, layer, weight_name): """ if not layer.__class__ in cls._LAYERS_RESHAPE_MAP: raise ValueError( - "Class {given_class} has not been registerd in the" + "Class {given_class} has not been registered in the " "ClusteringLookupRegistry. Use ClusteringLookupRegistry." "register_new_implemenetation to fix this.".format( given_class=layer.__class__ @@ -240,7 +240,7 @@ def get_clustering_impl(cls, layer, weight_name): if weight_name not in cls._LAYERS_RESHAPE_MAP[layer.__class__]: raise ValueError( "Weight with the name '{given_weight_name}' for class {given_class} " - "has not been registerd in the ClusteringLookupRegistry. Use " + "has not been registered in the ClusteringLookupRegistry. Use " "ClusteringLookupRegistry.register_new_implemenetation " "to fix this.".format( given_class=layer.__class__, From 89622bc0ecabeccbebed8b4448b30a1bd94b534e Mon Sep 17 00:00:00 2001 From: Andrew Ho Date: Sat, 13 Mar 2021 23:01:29 +0800 Subject: [PATCH 2/2] [Clustering] Fix error message in clustering_registry.py Fix typo for get_clustering_impl() --- .../python/core/clustering/keras/clustering_registry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tensorflow_model_optimization/python/core/clustering/keras/clustering_registry.py b/tensorflow_model_optimization/python/core/clustering/keras/clustering_registry.py index 14f0f14e6..f1bf0901a 100644 --- a/tensorflow_model_optimization/python/core/clustering/keras/clustering_registry.py +++ b/tensorflow_model_optimization/python/core/clustering/keras/clustering_registry.py @@ -233,7 +233,7 @@ def get_clustering_impl(cls, layer, weight_name): raise ValueError( "Class {given_class} has not been registered in the " "ClusteringLookupRegistry. Use ClusteringLookupRegistry." - "register_new_implemenetation to fix this.".format( + "register_new_implementation to fix this.".format( given_class=layer.__class__ ) ) @@ -241,7 +241,7 @@ def get_clustering_impl(cls, layer, weight_name): raise ValueError( "Weight with the name '{given_weight_name}' for class {given_class} " "has not been registered in the ClusteringLookupRegistry. Use " - "ClusteringLookupRegistry.register_new_implemenetation " + "ClusteringLookupRegistry.register_new_implementation " "to fix this.".format( given_class=layer.__class__, given_weight_name=weight_name