Skip to content

Commit 39089ce

Browse files
committed
Replaced SubClass with subclassed.
Change-Id: Ibf43764cbf4024890b68a2550ae44c6e52aade31
1 parent 6c9941e commit 39089ce

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tensorflow_model_optimization/python/core/clustering/keras/cluster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def _add_clustering_wrapper(layer):
133133
# There is no available public API to do this check.
134134
if (not layer._is_graph_network and
135135
not isinstance(layer, keras.models.Sequential)):
136-
raise ValueError("SubClass models are not supported currently.")
136+
raise ValueError("Subclassed models are not supported currently.")
137137

138138
return keras.models.clone_model(layer,
139139
input_tensors=None,

tensorflow_model_optimization/python/core/clustering/keras/cluster_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ def testClusterSubclassModelAsSubmodel(self):
403403
layers.Dense(10),
404404
model_subclass
405405
])
406-
with self.assertRaisesRegexp(ValueError, "SubClass models.*"):
406+
with self.assertRaisesRegexp(ValueError, "Subclassed models.*"):
407407
_ = cluster.cluster_weights(model, **self.params)
408408

409409
@keras_parameterized.run_all_keras_modes

0 commit comments

Comments
 (0)