From 3e13434bb787d024e3386ff75f305bfe8cda3288 Mon Sep 17 00:00:00 2001 From: James Ward Date: Thu, 28 Oct 2021 10:01:40 +0100 Subject: MLBEDSW-5440 MLCE: Vela crashing due to mismatch in padding shape in OFM Change convert_pad optimiser to use op.ifm_shapes attribute in place of the fickle op.ifm.shape (which in this case had changed due to the optimised-out reshape) Signed-off-by: James Ward Change-Id: I13fbd846ac8d3342afd7844d1041cfa15aaae124 --- ethosu/vela/tflite_graph_optimiser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethosu/vela/tflite_graph_optimiser.py b/ethosu/vela/tflite_graph_optimiser.py index f59eddef..2469a700 100644 --- a/ethosu/vela/tflite_graph_optimiser.py +++ b/ethosu/vela/tflite_graph_optimiser.py @@ -1058,7 +1058,7 @@ def convert_pad(op: Operation, arch, nng): ifm = op.ifm assert ifm is not None - ifm_shape = Shape4D(ifm.shape) + ifm_shape = op.ifm_shapes[0] ofm = op.ofm assert ofm is not None ofm.ops = [] -- cgit v1.2.1