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