diff options
author | Louis Verhaard <louis.verhaard@arm.com> | 2020-11-02 18:04:27 +0100 |
---|---|---|
committer | Louis Verhaard <louis.verhaard@arm.com> | 2020-11-16 10:56:29 +0100 |
commit | c86a9d2fe531dee57886b7adf6eb16dc16132650 (patch) | |
tree | 6a13cdae72e27a5eb13e6c79d4711dc2d01794e9 /ethosu/vela/tflite_writer.py | |
parent | 2fa1588f9128e077ec02d195356e89eb17452f3f (diff) | |
download | ethos-u-vela-c86a9d2fe531dee57886b7adf6eb16dc16132650.tar.gz |
MLBEDSW-3483, KeyError "fused_activation_function"
Bug fix for a regression: Vela could crash for operators placed on CPU.
Signed-off-by: Louis Verhaard <louis.verhaard@arm.com>
Change-Id: I99dcfdb4d3029ad86ffd2c8b3fd2547554794b79
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 de0ee742..e82fb5e4 100644 --- a/ethosu/vela/tflite_writer.py +++ b/ethosu/vela/tflite_writer.py @@ -278,8 +278,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.op_type + attrs["fused_activation_function"] = op.activation.op_type if op.activation is not None else None builtin_opt_offset, custom_opt_offset = opt_serializer.serialize(builder, attrs) |