aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ethosu/vela/supported_operators.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ethosu/vela/supported_operators.py b/ethosu/vela/supported_operators.py
index dfb7bc7d..24c72913 100644
--- a/ethosu/vela/supported_operators.py
+++ b/ethosu/vela/supported_operators.py
@@ -774,6 +774,12 @@ class SupportedOperators:
print("Warning:", op.type, "input shape differs from output shape, placing on CPU")
return False
+ elif op.type.is_relu_op():
+ ifm_tensor, ofm_tensor = op.get_ifm_ofm()
+ if np.isinf(ifm_tensor.quantization.scale_f32 / ofm_tensor.quantization.scale_f32):
+ print("Warning:", op.type, "has an infinite scale value, placing on CPU")
+ return False
+
return True
@classmethod