Skip to content

Commit 6569b35

Browse files
daverimtensorflower-gardener
authored andcommitted
Remove experimental modules from top level API
PiperOrigin-RevId: 400067370
1 parent 05f35a2 commit 6569b35

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

tensorflow_model_optimization/python/core/api/quantization/keras/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from tensorflow_model_optimization.python.core.api.quantization.keras import default_8bit
2121
from tensorflow_model_optimization.python.core.api.quantization.keras import graph_transformations
2222
from tensorflow_model_optimization.python.core.api.quantization.keras import collaborative_optimizations
23+
from tensorflow_model_optimization.python.core.api.quantization.keras import experimental
2324

2425
# quantize all layers with default quantization implementation.
2526
from tensorflow_model_optimization.python.core.quantization.keras.quantize import quantize_model

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from tensorflow_model_optimization.python.core.quantization.keras import quantizers
2626
from tensorflow_model_optimization.python.core.quantization.keras.default_8bit import default_8bit_quantize_registry
2727
from tensorflow_model_optimization.python.core.quantization.keras.default_8bit import default_8bit_quantize_scheme
28-
28+
from tensorflow_model_optimization.python.core.quantization.keras.experimental.default_n_bit import default_n_bit_quantize_registry
2929

3030
keras = tf.keras
3131

@@ -72,6 +72,7 @@ def quantize_scope(*args):
7272
'OutputOnlyConfig': quantize_config_mod.OutputOnlyConfig,
7373
}
7474
quantization_objects.update(default_8bit_quantize_registry._types_dict()) # pylint: disable=protected-access
75+
quantization_objects.update(default_n_bit_quantize_registry._types_dict()) # pylint: disable=protected-access
7576
quantization_objects.update(quantizers._types_dict()) # pylint: disable=protected-access
7677

7778
return tf.keras.utils.custom_object_scope(*(args + (quantization_objects,)))

0 commit comments

Comments
 (0)