diff options
author | Fredrik Svedberg <fredrik.svedberg@arm.com> | 2022-09-27 14:13:01 +0200 |
---|---|---|
committer | Fredrik Svedberg <fredrik.svedberg@arm.com> | 2022-10-04 09:20:33 +0000 |
commit | 4a434cba156cdfb2613b7ebe4d4a4ec9f85ba616 (patch) | |
tree | 47ebce38221b92b8eeb34e8b5f558223dcd4d3e3 /ethosu/vela/tosa_reader.py | |
parent | dda4caed56d2cd3a9d5927bf405859c1777ac909 (diff) | |
download | ethos-u-vela-4a434cba156cdfb2613b7ebe4d4a4ec9f85ba616.tar.gz |
MLBEDSW-6969 Remove RescaleAdd and RescaleMul operators
Removed RescaleAdd and RescaleMul operators in favour of
Operation.explicit_scale and removed Operation.rescale.
Signed-off-by: Fredrik Svedberg <fredrik.svedberg@arm.com>
Change-Id: Idccd8851731d4bb8d4e84970e0fd6b409d7d4e45
Diffstat (limited to 'ethosu/vela/tosa_reader.py')
-rw-r--r-- | ethosu/vela/tosa_reader.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ethosu/vela/tosa_reader.py b/ethosu/vela/tosa_reader.py index 2bec9cf1..cd18adb2 100644 --- a/ethosu/vela/tosa_reader.py +++ b/ethosu/vela/tosa_reader.py @@ -23,6 +23,7 @@ import numpy as np from .nn_graph import Graph from .nn_graph import Subgraph +from .operation import ExplicitScaling from .operation import Op from .operation import Operation from .reader_util import align_tensor_indices_to_nng @@ -183,8 +184,7 @@ class TosaSubgraph: if "shift" in op.attrs and op.type == Op.Mul: shift = op.attrs["shift"] if shift != 0: - op.type = Op.RescaleMul - op.rescale = [1, shift] + op.explicit_scaling = ExplicitScaling(False, [shift], [1]) if op.type.is_depthwise_conv2d_op(): op.attrs["depth_multiplier"] = op.weights.shape[3] if op.type == Op.SplitSliceRead: |