diff options
author | Fredrik Svedberg <fredrik.svedberg@arm.com> | 2021-02-16 21:59:50 +0100 |
---|---|---|
committer | Fredrik Svedberg <fredrik.svedberg@arm.com> | 2021-02-17 09:18:39 +0100 |
commit | 8d0f4890aa0ceae92a33ebb789701ff644a6fcaa (patch) | |
tree | fcecd50a7cc6375f5f4320b42f4b6c5231b854b1 /ethosu/vela/tflite_reader.py | |
parent | 56b6c711d8faaa6bcbc810e895efa650ddd97e73 (diff) | |
download | ethos-u-vela-8d0f4890aa0ceae92a33ebb789701ff644a6fcaa.tar.gz |
[MLBEDSW-3813] Fix LSTM operator pass through
Fixed pass through of LSTM operator.
Change-Id: I23140c69ab6cdc83f6bb8129256b4cc6a7c5ffac
Signed-off-by: Fredrik Svedberg <fredrik.svedberg@arm.com>
Diffstat (limited to 'ethosu/vela/tflite_reader.py')
-rw-r--r-- | ethosu/vela/tflite_reader.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ethosu/vela/tflite_reader.py b/ethosu/vela/tflite_reader.py index ae99c339..daea1bf8 100644 --- a/ethosu/vela/tflite_reader.py +++ b/ethosu/vela/tflite_reader.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 # @@ -109,6 +109,7 @@ class TFLiteSubgraph: dtype = datatype_map[tens_dtype] tens = Tensor(shape, dtype, name) quant = tens_data.Quantization() + tens.is_variable = tens_data.IsVariable() tens.quantization = QuantizationParameters() if quant is not None: @@ -144,6 +145,10 @@ class TFLiteSubgraph: op_type, opt_serializer, custom_code = self.graph.operator_codes[op_data.OpcodeIndex()] inputs = [self.tensors[idx] if idx != -1 else None for idx in op_data.InputsAsNumpy()] outputs = [self.tensors[idx] if idx != -1 else None for idx in op_data.OutputsAsNumpy()] + intermediates = [] + if op_data.IntermediatesLength(): + intermediates = [self.tensors[idx] if idx != -1 else None for idx in op_data.IntermediatesAsNumpy()] + name = "unknown_op_name" if len(outputs): name = outputs[0].name @@ -151,6 +156,7 @@ class TFLiteSubgraph: op.op_index = op_index op.inputs = inputs op.outputs = outputs + op.intermediates = intermediates for out in op.outputs: out.ops = [op] |