aboutsummaryrefslogtreecommitdiff
path: root/src/mlia/nn/rewrite/library/fc_layer.py
diff options
context:
space:
mode:
authorNathan Bailey <nathan.bailey@arm.com>2024-06-13 11:46:29 +0100
committerNathan Bailey <nathan.bailey@arm.com>2024-06-20 14:14:33 +0100
commit170376730d966a42e0622b5576a7db8fa2fa020e (patch)
tree635e00ba1f79c4e30245aad954718e59bf7e1462 /src/mlia/nn/rewrite/library/fc_layer.py
parent09b5122bab771161377321e3f17e05465171ad06 (diff)
downloadmlia-170376730d966a42e0622b5576a7db8fa2fa020e.tar.gz
feat: Enable Depthwise Separable conv2d rewrites
Enables rewrites to be replaced with sparse or clustered depthwise-separable-conv2d layers. Resolves: MLIA-1169 Signed-off-by: Nathan Bailey <nathan.bailey@arm.com> Change-Id: I83b65142346d468c390c694010cc1bf2218f3be1
Diffstat (limited to 'src/mlia/nn/rewrite/library/fc_layer.py')
-rw-r--r--src/mlia/nn/rewrite/library/fc_layer.py18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/mlia/nn/rewrite/library/fc_layer.py b/src/mlia/nn/rewrite/library/fc_layer.py
deleted file mode 100644
index 92195d1..0000000
--- a/src/mlia/nn/rewrite/library/fc_layer.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# SPDX-FileCopyrightText: Copyright 2023-2024, Arm Limited and/or its affiliates.
-# SPDX-License-Identifier: Apache-2.0
-"""Rewrite function used to return regular layers."""
-from typing import Any
-
-from keras.api._v2 import keras # Temporary workaround for now: MLIA-1107
-
-
-def fc_rewrite(input_shape: Any, output_shape: Any) -> keras.Model:
- """Fully connected TensorFlow Lite model for rewrite."""
- model = keras.Sequential(
- (
- keras.layers.InputLayer(input_shape=input_shape),
- keras.layers.Reshape([-1]),
- keras.layers.Dense(output_shape),
- )
- )
- return model