From e340233191a34285856f5bcb313df397982c95ef Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Fri, 12 Jan 2024 19:49:51 +0000 Subject: Fix typo in argmax pseudocode Axis is a dimension index of the input tensor, but is used to index the output tensor. Signed-off-by: Thomas Preud'homme Change-Id: Ie50f3921153e01437fe763b5d2b6cfaa06049f25 --- pseudocode/operators/ARGMAX.tosac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pseudocode/operators/ARGMAX.tosac b/pseudocode/operators/ARGMAX.tosac index bbe301f..982957a 100644 --- a/pseudocode/operators/ARGMAX.tosac +++ b/pseudocode/operators/ARGMAX.tosac @@ -23,7 +23,7 @@ for_each(left_index in left_shape) { for_each(right_index in right_shape) { in_t max_value = minimum_s; out_t max_index = 0; - for (i = 0; i < shape[axis]; i++) { + for (i = 0; i < shape1[axis]; i++) { dim_t index = flatten(left_index, [i], right_index); in_t value = tensor_read(input, shape1, index); if (apply_max_s(value, max_value) != max_value) { -- cgit v1.2.1