From bf31d647dc5df47410ee577b12427ddf076d816b Mon Sep 17 00:00:00 2001 From: Patrik Gustavsson Date: Wed, 16 Dec 2020 13:08:06 +0100 Subject: MLBEDSW-3645 4D class for op ifm/ofm shapes Add 4D shape class for op Ifm/ofm shapes Signed-off-by: Patrik Gustavsson Change-Id: Ic0a98da9d2f9d085605e39a9ab5a26bad6e702a3 --- ethosu/vela/softmax.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ethosu/vela/softmax.py') 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 -- cgit v1.2.1