From 30cb47abd68b125d5c3fc315948187a9ea8dbd43 Mon Sep 17 00:00:00 2001 From: Jacob Bohlin Date: Mon, 17 Aug 2020 10:13:04 +0200 Subject: MLBEDSW-2718: Fix a bug that would reshape TransposeConv input Signed-off-by: Jacob Bohlin Change-Id: If22fd21f9953a62305620a4e804e5caacb342c89 --- ethosu/vela/tflite_reader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ethosu') diff --git a/ethosu/vela/tflite_reader.py b/ethosu/vela/tflite_reader.py index 5e966d1b..daa208f1 100644 --- a/ethosu/vela/tflite_reader.py +++ b/ethosu/vela/tflite_reader.py @@ -153,7 +153,8 @@ class TFLiteSubgraph: if op_type.startswith("DepthwiseConv2d") or op_type.startswith("Conv2D"): inputs[1] = clone_and_reshape_tensor(inputs[1], (1, 2, 3, 0)) - inputs[2] = clone_and_reshape_tensor(inputs[2], (0,)) + if not op.type.endswith("BackpropInput"): + inputs[2] = clone_and_reshape_tensor(inputs[2], (0,)) if op_type.startswith("FullyConnected"): inputs[1] = clone_and_reshape_tensor(inputs[1], (1, 0)) -- cgit v1.2.1