def argmax
import bend-ml-tensor-array@0.1.19.0/main.bend as BendMlTensorArrayimport Base
500def argmax(xs: List<&2, F32>) -> Nat:
501 match xs:
502 case Nil{}:
503 0n
504 case Con{+h, +t}:
505 argmax2(t, gt_head(t, h), 1n, 0n, h)
import bend-ml-tensor-array@0.1.19.0/main.bend as BendMlTensorArrayimport Base
500def argmax(xs: List<&2, F32>) -> Nat:
501 match xs:
502 case Nil{}:
503 0n
504 case Con{+h, +t}:
505 argmax2(t, gt_head(t, h), 1n, 0n, h)