MLBEDSW-2603 Missing "new_shape" attrib in Reshape

Reshape ops should contain a "new_shape" attribute. An invalid tflite
file without this attribute caused vela to crash.
The new_shape however is the same as the output shape, so if missing, we
can easily add this missing attribute.

Signed-off-by: Michael McGeagh <michael.mcgeagh@arm.com>
Change-Id: I28ebf028c68bf34bcf03746f57fce53abfcf09e1
diff --git a/ethosu/vela/tflite_reader.py b/ethosu/vela/tflite_reader.py
index 9d312e5..be47cb1 100644
--- a/ethosu/vela/tflite_reader.py
+++ b/ethosu/vela/tflite_reader.py
@@ -164,6 +164,10 @@
         if opt_serializer is not None:
             op.attrs = opt_serializer.deserialize(op_data)
 
+            if op_type == "Reshape" and "new_shape" not in op.attrs:
+                # Reshape should have an attrib "new_shape" but if it is missing, add it based on the output shape
+                op.attrs["new_shape"] = outputs[0].shape
+
             if "stride_w" in op.attrs:
                 op.attrs["strides"] = (1, op.attrs["stride_h"], op.attrs["stride_w"], 1)
             if "filter_width" in op.attrs: