Skip to content

Commit 812ea04

Browse files
Merge pull request #699 from Ruomei:toupstream/pcqat
PiperOrigin-RevId: 379190059
2 parents ec43970 + 0cbc0c2 commit 812ea04

File tree

7 files changed

+1037
-176
lines changed

7 files changed

+1037
-176
lines changed

tensorflow_model_optimization/python/core/quantization/keras/collaborative_optimizations/cluster_preserve/BUILD

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ py_strict_library(
3535
],
3636
srcs_version = "PY3",
3737
deps = [
38+
":cluster_utils",
3839
# tensorflow dep1,
3940
"//tensorflow_model_optimization/python/core/clustering/keras:clustering_registry",
4041
"//tensorflow_model_optimization/python/core/quantization/keras:quant_ops",
@@ -61,6 +62,23 @@ py_test(
6162
],
6263
)
6364

65+
py_test(
66+
name = "mnist_prune_cluster_preserve_qat_test",
67+
srcs = [
68+
"mnist_prune_cluster_preserve_qat_test.py",
69+
],
70+
python_version = "PY3",
71+
visibility = ["//visibility:private"],
72+
deps = [
73+
":default_8bit_cluster_preserve_quantize_scheme",
74+
# tensorflow dep1,
75+
"//tensorflow_model_optimization/python/core/clustering/keras/experimental:cluster",
76+
"//tensorflow_model_optimization/python/core/quantization/keras:quantize",
77+
"//tensorflow_model_optimization/python/core/sparsity/keras:prune",
78+
"//tensorflow_model_optimization/python/core/sparsity/keras:pruning_callbacks",
79+
],
80+
)
81+
6482
py_strict_library(
6583
name = "default_8bit_cluster_preserve_quantize_scheme",
6684
srcs = [
@@ -72,3 +90,21 @@ py_strict_library(
7290
"//tensorflow_model_optimization/python/core/quantization/keras/default_8bit:default_8bit_quantize_scheme",
7391
],
7492
)
93+
94+
py_test(
95+
name = "cluster_preserve_integration_test",
96+
srcs = [
97+
"cluster_preserve_integration_test.py",
98+
],
99+
python_version = "PY3",
100+
visibility = ["//visibility:private"],
101+
deps = [
102+
":default_8bit_cluster_preserve_quantize_scheme",
103+
# tensorflow dep1,
104+
"//tensorflow_model_optimization/python/core/clustering/keras:cluster",
105+
"//tensorflow_model_optimization/python/core/clustering/keras:clustering_registry",
106+
"//tensorflow_model_optimization/python/core/clustering/keras/experimental:cluster",
107+
"//tensorflow_model_optimization/python/core/quantization/keras:quantize",
108+
"//tensorflow_model_optimization/python/core/quantization/keras:quantize_config",
109+
],
110+
)

0 commit comments

Comments
 (0)