asc.language.tile.reduction_ops.reduce_prod
- asc.language.tile.reduction_ops.reduce_prod(input: Tile, *dims: int, keep_dims: bool = False) Tile
Returns the product 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.- Parameters:
input – the input tile
dims – 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 product of 128 elements in corresponding column:
input = asc2.load(x, [128, 256], offsets=[0, 0]) result = asc2.reduce_prod(0)
This function can also be called as a member function on
Tile, asx.prod(...)instead ofreduce_prod(x, ...).