aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/tosa_reader.py
diff options
context:
space:
mode:
Diffstat (limited to 'ethosu/vela/tosa_reader.py')
-rw-r--r--ethosu/vela/tosa_reader.py4
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: