Skip to content

Commit 15e730a

Browse files
Merge pull request #421 from arovir01:toupstream/clustering_docgen
PiperOrigin-RevId: 322239236
2 parents 0cf7882 + dcb5f92 commit 15e730a

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

tensorflow_model_optimization/python/core/api/BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ py_library(
88
name = "api",
99
srcs = [
1010
"__init__.py",
11+
"clustering/__init__.py",
12+
"clustering/keras/__init__.py",
1113
"quantization/__init__.py",
1214
"quantization/keras/__init__.py",
1315
"quantization/keras/quantizers/__init__.py",
@@ -16,6 +18,7 @@ py_library(
1618
],
1719
srcs_version = "PY2AND3",
1820
deps = [
21+
"//tensorflow_model_optimization/python/core/clustering/keras",
1922
"//tensorflow_model_optimization/python/core/quantization/keras",
2023
"//tensorflow_model_optimization/python/core/sparsity/keras",
2124
],

tensorflow_model_optimization/python/core/api/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
# limitations under the License.
1414
# ==============================================================================
1515
"""Import API modules for Tensorflow Model Optimization."""
16+
from tensorflow_model_optimization.python.core.api import clustering
1617
from tensorflow_model_optimization.python.core.api import quantization
1718
from tensorflow_model_optimization.python.core.api import sparsity
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright 2020 The TensorFlow Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
# ==============================================================================
15+
"""Module containing code for clustering."""
16+
from tensorflow_model_optimization.python.core.api.clustering import keras
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2020 The TensorFlow Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
# ==============================================================================
15+
"""Module containing clustering code built on Keras abstractions."""
16+
# pylint: disable=g-bad-import-order
17+
from tensorflow_model_optimization.python.core.clustering.keras.cluster import cluster_scope
18+
from tensorflow_model_optimization.python.core.clustering.keras.cluster import cluster_weights
19+
from tensorflow_model_optimization.python.core.clustering.keras.cluster import strip_clustering
20+
21+
from tensorflow_model_optimization.python.core.clustering.keras.cluster_config import CentroidInitialization
22+
# pylint: enable=g-bad-import-order

0 commit comments

Comments
 (0)