diff options
author | Louis Verhaard <louis.verhaard@arm.com> | 2020-10-12 09:22:54 +0200 |
---|---|---|
committer | patrik.gustavsson <patrik.gustavsson@arm.com> | 2020-10-12 09:47:14 +0000 |
commit | 7ec09e73b5147af13990f4cac8e8e376ef538174 (patch) | |
tree | 491ca5a25727e0a29171abcd434dcc662e487b40 /ethosu/vela/tflite_writer.py | |
parent | 2e186c794b4bdc68d89428a58848e376591f76a0 (diff) | |
download | ethos-u-vela-7ec09e73b5147af13990f4cac8e8e376ef538174.tar.gz |
MLBEDSW-3220: missing "fused_activation_function" caused crash
Vela could crash in operator serialization if "fused_activation_function"
was not set.
Change-Id: I7f2364b0849fd371dee87e26c6d33d44ce8cec26
Signed-off-by: Louis Verhaard <louis.verhaard@arm.com>
Diffstat (limited to 'ethosu/vela/tflite_writer.py')
-rw-r--r-- | ethosu/vela/tflite_writer.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ethosu/vela/tflite_writer.py b/ethosu/vela/tflite_writer.py index f444ee51..e24aa282 100644 --- a/ethosu/vela/tflite_writer.py +++ b/ethosu/vela/tflite_writer.py @@ -282,8 +282,7 @@ class TFLiteSerialiser: attrs["dilation_w_factor"] = attrs["dilation"][2] if "channel_multiplier" in attrs: attrs["depth_multiplier"] = attrs["channel_multiplier"] - if op.activation is not None: - attrs["fused_activation_function"] = op.activation + attrs["fused_activation_function"] = op.activation builtin_opt_offset, custom_opt_offset = opt_serializer.serialize(builder, attrs) |