diff options
author | Patrik Gustavsson <patrik.gustavsson@arm.com> | 2020-11-03 10:24:08 +0100 |
---|---|---|
committer | Patrik Gustavsson <patrik.gustavsson@arm.com> | 2020-11-03 16:21:21 +0100 |
commit | 34359589655e62d0f2cadde53320de71add04e94 (patch) | |
tree | af2a10c420f9bedc1984225bd2f16717fad11af9 /ethosu/vela/tflite_reader.py | |
parent | 7e1d1d181d5334bf50fc2e1f39f11c20a22fc341 (diff) | |
download | ethos-u-vela-34359589655e62d0f2cadde53320de71add04e94.tar.gz |
MLBEDSW-2868 Separate scale+bias tensors
Separate scale+bias tensors by different equivilence_id.
Signed-off-by: Patrik Gustavsson <patrik.gustavsson@arm.com>
Change-Id: I674341950bc001ac6e4015206995f048a0dfee75
Diffstat (limited to 'ethosu/vela/tflite_reader.py')
-rw-r--r-- | ethosu/vela/tflite_reader.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ethosu/vela/tflite_reader.py b/ethosu/vela/tflite_reader.py index f4f48049..82feddd9 100644 --- a/ethosu/vela/tflite_reader.py +++ b/ethosu/vela/tflite_reader.py @@ -161,6 +161,9 @@ class TFLiteSubgraph: inputs.append(None) if inputs[-1] and inputs[-1].values is not None: inputs[-1] = clone_and_reshape_tensor(inputs[-1], (0,)) + # Since bias tensor is used for both bias and scale, + # set different equivalence_id for all bias tensors + inputs[-1].set_random_equivalence_id() if opt_serializer is not None: op.attrs = opt_serializer.deserialize(op_data) |