aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/mark_tensors.py
diff options
context:
space:
mode:
authorLouis Verhaard <louis.verhaard@arm.com>2020-08-13 11:47:36 +0200
committerLouis Verhaard <louis.verhaard@arm.com>2020-08-24 11:39:18 +0200
commitb9fc33c194036973273604d5fd7af9e814133238 (patch)
tree6073239bcd0cbb53838d363cc1d380f2db05ce6b /ethosu/vela/mark_tensors.py
parente9194df0b003db774fc73d841945f213b714016b (diff)
downloadethos-u-vela-b9fc33c194036973273604d5fd7af9e814133238.tar.gz
MLBEDSW-2688: LeakyRelu rewrite to LUT or MUL/MAX
Replaces LeakyRelu operations with LUT activation function when possible, else to a combination of multiplication/maximization. Signed-off-by: Louis Verhaard <louis.verhaard@arm.com> Change-Id: I3d2eb2dba7145997c3cc711d0ef18ab355fbb416
Diffstat (limited to 'ethosu/vela/mark_tensors.py')
-rw-r--r--ethosu/vela/mark_tensors.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ethosu/vela/mark_tensors.py b/ethosu/vela/mark_tensors.py
index 40ce467b..03ab83fe 100644
--- a/ethosu/vela/mark_tensors.py
+++ b/ethosu/vela/mark_tensors.py
@@ -284,7 +284,7 @@ def mark_tensor_purpose(nng, arch, verbose_tensor_purpose=False):
)
for idx, tens in enumerate(op.inputs):
- purpose = input_purpose(op, idx)
+ purpose = input_purpose(op, idx) if tens.purpose == TensorPurpose.Unknown else tens.purpose
mark_tensor_helper(tens, purpose)
if op.type == "Reshape":