The input to the reduction.
The axes the reduction should be performed along.
The resulting operation.
import dopt.core : evaluate; auto a = float32([2, 2],[ 1.0f, 4.0f, 3.0f, 6.0f ]); assert(a.maxElement.evaluate().get!float == [6.0f]); //Max value in the entire tensor assert(a.maxElement([0]).evaluate().get!float == [3.0f, 6.0f]); //Max of each column assert(a.maxElement([1]).evaluate().get!float == [4.0f, 6.0f]); //Max of each row
Computes a max reduction along the specified axes.