aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/softmax.py
diff options
context:
space:
mode:
authorpatrik.gustavsson <patrik.gustavsson@arm.com>2020-12-21 17:10:40 +0000
committerpatrik.gustavsson <patrik.gustavsson@arm.com>2020-12-21 17:10:40 +0000
commiteeb85154b00a9864d0d63e382e9c80ca8e294d5d (patch)
tree85ddd620916565aa8565d072b764ca4918b405a1 /ethosu/vela/softmax.py
parentdf0a5905177f3a1b836076bc3f9f39b2e86f1794 (diff)
downloadethos-u-vela-eeb85154b00a9864d0d63e382e9c80ca8e294d5d.tar.gz
Revert "Revert "MLBEDSW-3645 4D class for op ifm/ofm shapes""
This reverts commit df0a5905177f3a1b836076bc3f9f39b2e86f1794. Reason for revert: <INSERT REASONING HERE> Change-Id: I891c66fb29db9d25e942947e8d1c29a10610de51
Diffstat (limited to 'ethosu/vela/softmax.py')
-rw-r--r--ethosu/vela/softmax.py4
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