Tensor.argmax
- Tensor.argmax()
- Returns:
the list of positions of the max and the max of all elements in the Tensor
- Return type:
tuple
Example
import pyagrum as gum
a, b = gum.LabelizedVariable("a", "a", 2), gum.LabelizedVariable("b", "b", 3)
p = gum.Tensor().add(a).add(b).fillWith([1, 2, 3, 4, 5, 6])
p.argmax()
# ([{'a': 1, 'b': 2}], 6.0)
Class