diff options
author | Patrik Gustavsson <patrik.gustavsson@arm.com> | 2021-06-30 09:07:16 +0200 |
---|---|---|
committer | Patrik Gustavsson <patrik.gustavsson@arm.com> | 2021-07-09 09:51:44 +0200 |
commit | 5e26eda0e0f359b6e22b1f1eeb9344cd15e0f093 (patch) | |
tree | dce92ab9d8a6ceb261c48353ff7077295efa21da /ethosu/vela/tosa_graph_optimiser.py | |
parent | 8f1f9aaa58175b17cd2e505bfcdb0e40c955ea72 (diff) | |
download | ethos-u-vela-5e26eda0e0f359b6e22b1f1eeb9344cd15e0f093.tar.gz |
MLBEDSW-4840 Move setting of input indices to tflite reader
Mapping to internal input indexing has been added to
tflite_reader.py and tosa_reader.py.
And the other way around in tflite_writer.py.
Signed-off-by: Patrik Gustavsson <patrik.gustavsson@arm.com>
Change-Id: I4d8596e747cfa7c4203884c4e785eb1977e2bcc1
Diffstat (limited to 'ethosu/vela/tosa_graph_optimiser.py')
-rw-r--r-- | ethosu/vela/tosa_graph_optimiser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ethosu/vela/tosa_graph_optimiser.py b/ethosu/vela/tosa_graph_optimiser.py index 94e6f999..fe18ce35 100644 --- a/ethosu/vela/tosa_graph_optimiser.py +++ b/ethosu/vela/tosa_graph_optimiser.py @@ -60,7 +60,7 @@ def add_padding_fields(op, arch, nng): def rewrite_activation(op, arch, nng): - if not op.type.is_relu_op(): + if op.type not in (Op.ReluN, Op.Clamp): return op ifm = op.ifm @@ -82,7 +82,7 @@ def rewrite_activation(op, arch, nng): if op.ofm.quantization.zero_point is None: op.ofm.quantization.zero_point = zp - if op.type == Op.Clip: + if op.type == Op.Clamp: op.attrs["min"] = op.attrs["min_int"] - zp op.attrs["max"] = op.attrs["max_int"] - zp elif op.type == Op.ReluN: |