aboutsummaryrefslogtreecommitdiff
path: root/src/mlia/nn/rewrite/library/fc_clustering_layer.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mlia/nn/rewrite/library/fc_clustering_layer.py')
-rw-r--r--src/mlia/nn/rewrite/library/fc_clustering_layer.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mlia/nn/rewrite/library/fc_clustering_layer.py b/src/mlia/nn/rewrite/library/fc_clustering_layer.py
new file mode 100644
index 0000000..07c07ac
--- /dev/null
+++ b/src/mlia/nn/rewrite/library/fc_clustering_layer.py
@@ -0,0 +1,13 @@
+# SPDX-FileCopyrightText: Copyright 2024, Arm Limited and/or its affiliates.
+# SPDX-License-Identifier: Apache-2.0
+"""Example rewrite with one fully connected clustered layer."""
+from typing import Any
+
+from keras.api._v2 import keras # Temporary workaround for now: MLIA-1107
+
+from mlia.nn.rewrite.library.fc_layer import get_keras_model
+
+
+def get_keras_model_clus(input_shape: Any, output_shape: Any) -> keras.Model:
+ """Generate TensorFlow Lite model for clustering rewrite."""
+ return get_keras_model(input_shape, output_shape)