diff options
author | Patrik Gustavsson <patrik.gustavsson@arm.com> | 2020-12-16 13:08:06 +0100 |
---|---|---|
committer | Patrik Gustavsson <patrik.gustavsson@arm.com> | 2020-12-21 07:34:05 +0100 |
commit | bf31d647dc5df47410ee577b12427ddf076d816b (patch) | |
tree | 85ddd620916565aa8565d072b764ca4918b405a1 /ethosu/vela/softmax.py | |
parent | 2349d429d926e258e9a61d34c7fd97660ab9fb98 (diff) | |
download | ethos-u-vela-bf31d647dc5df47410ee577b12427ddf076d816b.tar.gz |
MLBEDSW-3645 4D class for op ifm/ofm shapes
Add 4D shape class for op Ifm/ofm shapes
Signed-off-by: Patrik Gustavsson <patrik.gustavsson@arm.com>
Change-Id: Ic0a98da9d2f9d085605e39a9ab5a26bad6e702a3
Diffstat (limited to 'ethosu/vela/softmax.py')
-rw-r--r-- | ethosu/vela/softmax.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ethosu/vela/softmax.py b/ethosu/vela/softmax.py index 98496539..3b4bace9 100644 --- a/ethosu/vela/softmax.py +++ b/ethosu/vela/softmax.py @@ -213,7 +213,7 @@ class SoftMax: ofm = self.op.outputs[0] # Reshape ifm/ofm (if needed) - full_shape = self.op.ifm_shapes[0] + full_shape = self.op.ifm_shapes[0].as_list() if full_shape[0] > 1: full_shape[1] *= full_shape[0] full_shape[0] = 1 @@ -414,6 +414,7 @@ class SoftMax: shr30_op.add_input_tensor(scaled_exp) shr30_op.add_input_tensor(right_shift) shr30_op.set_output_tensor(ofm) + shr30_op.set_ifm_ofm_shapes() DebugDatabase.add_optimised(self.op, shr30_op) return shr30_op @@ -535,6 +536,7 @@ class SoftMax: shr13_op.add_input_tensor(mul_ofm) shr13_op.add_input_tensor(reciprocal_right_shift) shr13_op.set_output_tensor(ofm) + shr13_op.set_ifm_ofm_shapes() DebugDatabase.add_optimised(self.op, shr13_op) return shr13_op |