diff options
author | Fredrik Svedberg <fredrik.svedberg@arm.com> | 2021-01-18 15:21:03 +0100 |
---|---|---|
committer | patrik.gustavsson <patrik.gustavsson@arm.com> | 2021-01-20 14:50:26 +0000 |
commit | e82be7c1a000277b44da7e85c527229a1d5eab2a (patch) | |
tree | d8c1784f938b32fe3233e80fbc5f6ea90ecb321b /ethosu/vela/softmax.py | |
parent | db5124c2b5e10b34c61b3e016bb597ba1c1574df (diff) | |
download | ethos-u-vela-e82be7c1a000277b44da7e85c527229a1d5eab2a.tar.gz |
[MLBEDSW-2787] Remove op.attrs["rescale"] in softmax.py
Added RescaleAdd operation to avoid non-standard attribute
"rescale" for Add operation. Also changed ResizeBilinear
in the same way.
Signed-off-by: Fredrik Svedberg <fredrik.svedberg@arm.com>
Change-Id: I1d286f63890585c06b8a161df1ff77e3f844a4b9
Diffstat (limited to 'ethosu/vela/softmax.py')
-rw-r--r-- | ethosu/vela/softmax.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ethosu/vela/softmax.py b/ethosu/vela/softmax.py index 3b4bace9..8a1770e1 100644 --- a/ethosu/vela/softmax.py +++ b/ethosu/vela/softmax.py @@ -35,6 +35,7 @@ from .operation_util import create_clz from .operation_util import create_depthwise_maxpool from .operation_util import create_mul from .operation_util import create_reduce_sum +from .operation_util import create_rescale_add from .operation_util import create_shl from .operation_util import create_shr from .operation_util import create_sub @@ -331,13 +332,13 @@ class SoftMax: "F0_one_const", [1, 1, 1, 1], DataType.int32, [(1 << 31) - 1], np.int32, quantization=no_scale_quant ) half_denominator = add_op_get_ofm( - create_add( + create_rescale_add( f"{self.op.name}_add{pass_number}", f0_one_const, shifted_sum_minus_one, + (1, 1), # Custom rescale one_scale_quant, activation, - attrs={"rescale": (1, 1)}, ) ) |