Skip to content

Commit 8b1a801

Browse files
Xharktensorflower-gardener
authored andcommitted
Handle the error type reflect to the keras update.
PiperOrigin-RevId: 525290075
1 parent 1af566d commit 8b1a801

File tree

1 file changed

+1
-1
lines changed
  • tensorflow_model_optimization/python/core/quantization/keras

1 file changed

+1
-1
lines changed

tensorflow_model_optimization/python/core/quantization/keras/quantize.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ def _quantize(layer): # pylint: disable=missing-docstring
454454
# modifications don't affect the original model, or its weights.
455455
try:
456456
model_copy = _clone_model_with_weights(model)
457-
except ValueError as er:
457+
except (ValueError, TypeError) as er:
458458
raise ValueError(
459459
'Unable to clone model. This generally happens if you used custom '
460460
'Keras layers or objects in your model. Please specify them via '

0 commit comments

Comments
 (0)