aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrik Gustavsson <patrik.gustavsson@arm.com>2020-10-06 10:14:36 +0200
committerPatrik Gustavsson <patrik.gustavsson@arm.com>2020-10-09 08:15:29 +0200
commite2dbed28e816064d05119b2e736aad2b50048b7c (patch)
treee47f3d3b8fb313f636e0f430004a84b04e5f9ae3
parentaee5d7537ff81ffda5ba222721b72f914ce50fb8 (diff)
downloadethos-u-vela-e2dbed28e816064d05119b2e736aad2b50048b7c.tar.gz
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 <patrik.gustavsson@arm.com> Change-Id: Id5e53b093508583c2d70ba7e337869db3de32701
-rw-r--r--ethosu/vela/tflite_reader.py2
1 files changed, 1 insertions, 1 deletions
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: