diff options
author | Tim Hall <tim.hall@arm.com> | 2023-03-10 18:11:34 +0000 |
---|---|---|
committer | Tim Hall <tim.hall@arm.com> | 2023-04-21 18:23:03 +0100 |
commit | 2180a172c31f27899d3bf77bfecccc1768667737 (patch) | |
tree | 2147c32ae3226599ba19077cd5f3ccf3ffb6a734 /ethosu/vela/operation.py | |
parent | 7b3008a905d2a5122e21f945db7d2a2132473c53 (diff) | |
download | ethos-u-vela-2180a172c31f27899d3bf77bfecccc1768667737.tar.gz |
MLBEDSW-7408: MLCE: Crash when serialising model LSTM
- Added checking and reporting of missing operator attributes when
reading and writing TFLite file
- Added a TFLite semantic check to ensure that all required attribute
fields of builtin operators are read
- Added some sanity checks for RESHAPE operators that run on the
Ethos-U
- Stopped CPU operators from having their attributes modified
Change-Id: I05700681acdb09554f5945819717c08a9457295c
Signed-off-by: Tim Hall <tim.hall@arm.com>
Diffstat (limited to 'ethosu/vela/operation.py')
-rw-r--r-- | ethosu/vela/operation.py | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/ethosu/vela/operation.py b/ethosu/vela/operation.py index d1670536..eafe3bd1 100644 --- a/ethosu/vela/operation.py +++ b/ethosu/vela/operation.py @@ -854,15 +854,6 @@ class Operation: ifm_tensor, ifm2_tensor, ofm_tensor = self.get_ifm_ifm2_ofm() - if self.type == Op.Reshape: - # Set ofm shape - if len(self.inputs) > 1 and self.inputs[1].values is not None: - ofm_tensor.shape = self.inputs[1].values.flatten().tolist() - ofm_elements = ofm_tensor.elements() - # Stretch dimension - if ofm_elements < 0: - ofm_tensor.shape[ofm_tensor.shape.index(-1)] = int(ifm_tensor.elements() / abs(ofm_elements)) - # set all shapes to op, as 4D if self.type == Op.FullyConnected: if len(self.ifm.shape) == 2: |