asc.language.tile.reduction_ops.reduce_max
- asc.language.tile.reduction_ops.reduce_max(input: Tile, *dims: int, keep_dims: bool = False) Tile
- asc.language.tile.reduction_ops.reduce_max(input: Tile) PlainValue
Returns the maximum value of each row of the
inputtile in the given dimensionsdims.Dimensions
dimsare squeezed, resulting the output tile having fewer dimensions than input, unlesskeep_dims=Trueis provided. When dimension is not specified, the entire tile is reduced to a single scalar value.- Parameters:
input – the input tile
dims – optional, dimensions to reduce, should be in range of [0..len(input.shape)-1]
keep_dims – if set to True, then reduced dimensions are kept in the result shape with size of 1
Examples
Reduce tile by first (outermost) dimension, resulting tile having the shape [256], each element is a maximum value between 128 elements in corresponding column:
input = asc2.load(x, [128, 256], offsets=[0, 0]) result = asc2.reduce_max(input, 0)
Compute the maximum value between all tile elements, returns single scalar value:
input = asc2.load(x, [256, 256], offsets=[0, 0]) result = asc2.reduce_max(input)
This function can also be called as a member function on
Tile, asx.max(...)instead ofreduce_max(x, ...).