From e2dbed28e816064d05119b2e736aad2b50048b7c Mon Sep 17 00:00:00 2001 From: Patrik Gustavsson Date: Tue, 6 Oct 2020 10:14:36 +0200 Subject: MLBEDSW-2985 Avoid reshape if input when there are no values Added check so that inputs with no values are not reshaped. Signed-off-by: Patrik Gustavsson Change-Id: Id5e53b093508583c2d70ba7e337869db3de32701 --- ethosu/vela/tflite_reader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethosu/vela/tflite_reader.py b/ethosu/vela/tflite_reader.py index a03f9ec2..f4f48049 100644 --- a/ethosu/vela/tflite_reader.py +++ b/ethosu/vela/tflite_reader.py @@ -159,7 +159,7 @@ class TFLiteSubgraph: if op.type.needs_bias() and len(inputs) <= op_type.info.indices.biases[0]: # No Bias tensor inputs.append(None) - if inputs[-1]: + if inputs[-1] and inputs[-1].values is not None: inputs[-1] = clone_and_reshape_tensor(inputs[-1], (0,)) if opt_serializer is not None: -- cgit v1.2.1