Skip to content

Commit 0cbc0c2

Browse files
committed
[Collaborative optimization] Pruning-Clustering-preserving Quantization Aware Training (PCQAT)
1 parent 137850e commit 0cbc0c2

File tree

7 files changed

+1032
-172
lines changed

7 files changed

+1032
-172
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+
# tensorflow dep1,
74+
":default_8bit_cluster_preserve_quantize_scheme",
75+
"//tensorflow_model_optimization/python/core/quantization/keras:quantize",
76+
"//tensorflow_model_optimization/python/core/sparsity/keras:prune",
77+
"//tensorflow_model_optimization/python/core/sparsity/keras:pruning_callbacks",
78+
"//tensorflow_model_optimization/python/core/clustering/keras/experimental:cluster",
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:clustering_registry",
105+
"//tensorflow_model_optimization/python/core/clustering/keras:cluster",
106+
"//tensorflow_model_optimization/python/core/clustering/keras/experimental:cluster",
107+
"//tensorflow_model_optimization/python/core/quantization/keras:quantize_config",
108+
"//tensorflow_model_optimization/python/core/quantization/keras:quantize"
109+
],
110+
)

0 commit comments

Comments
 (0)