diff options
Diffstat (limited to 'ethosu/vela/tflite_graph_optimiser.py')
-rw-r--r-- | ethosu/vela/tflite_graph_optimiser.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ethosu/vela/tflite_graph_optimiser.py b/ethosu/vela/tflite_graph_optimiser.py index 7b10f86a..8cfc3734 100644 --- a/ethosu/vela/tflite_graph_optimiser.py +++ b/ethosu/vela/tflite_graph_optimiser.py @@ -146,7 +146,11 @@ def rewrite_split_ops(tens, arch, nng): new_op = Operation(Op.SplitSliceRead, split_op.name) new_op.inputs = [inp] ofm_shape_idx = 0 - read_shape = offset_end + if None in (offset_end, offset_start): + read_shape = None + else: + # the read shape is relative to each start offset + read_shape = [oe - os for oe, os in zip(offset_end, offset_start)] # For Split the offset cannot be extracted from the tensor so it has to # be calculated from the index of the output tensor |