aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/tensor.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/tensor.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/tensor.py')
-rw-r--r--ethosu/vela/tensor.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ethosu/vela/tensor.py b/ethosu/vela/tensor.py
index 5fdea979..f0e7ea44 100644
--- a/ethosu/vela/tensor.py
+++ b/ethosu/vela/tensor.py
@@ -728,6 +728,9 @@ class Tensor:
return True
return False
+ def is_scaling_equal(self, tens):
+ return self.quantization.is_scaling_equal(tens.quantization)
+
def equivalent(self, tens):
return self.equivalence_id == tens.equivalence_id