File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
tensorflow_model_optimization/python/core Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 20
20
from tensorflow_model_optimization .python .core .api .quantization .keras import default_8bit
21
21
from tensorflow_model_optimization .python .core .api .quantization .keras import graph_transformations
22
22
from tensorflow_model_optimization .python .core .api .quantization .keras import collaborative_optimizations
23
+ from tensorflow_model_optimization .python .core .api .quantization .keras import experimental
23
24
24
25
# quantize all layers with default quantization implementation.
25
26
from tensorflow_model_optimization .python .core .quantization .keras .quantize import quantize_model
Original file line number Diff line number Diff line change 25
25
from tensorflow_model_optimization .python .core .quantization .keras import quantizers
26
26
from tensorflow_model_optimization .python .core .quantization .keras .default_8bit import default_8bit_quantize_registry
27
27
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
29
29
30
30
keras = tf .keras
31
31
@@ -72,6 +72,7 @@ def quantize_scope(*args):
72
72
'OutputOnlyConfig' : quantize_config_mod .OutputOnlyConfig ,
73
73
}
74
74
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
75
76
quantization_objects .update (quantizers ._types_dict ()) # pylint: disable=protected-access
76
77
77
78
return tf .keras .utils .custom_object_scope (* (args + (quantization_objects ,)))
You can’t perform that action at this time.
0 commit comments