Class Reduce


  • public class Reduce
    extends PrimitiveTensorFunction
    The reduce tensor operation returns a tensor produced from the argument tensor where some dimensions are collapsed to a single value using an aggregator function.
    Author:
    bratseth
    • Constructor Detail

      • Reduce

        public Reduce​(TensorFunction argument,
                      Reduce.Aggregator aggregator,
                      java.lang.String dimension)
        Creates a reduce function reducing a single dimension
      • Reduce

        public Reduce​(TensorFunction argument,
                      Reduce.Aggregator aggregator,
                      java.util.List<java.lang.String> dimensions)
        Creates a reduce function.
        Parameters:
        argument - the tensor to reduce
        aggregator - the aggregator function to use
        dimensions - the list of dimensions to remove. If an empty list is given, all dimensions are reduced, producing a dimensionless tensor (a scalar).
        Throws:
        java.lang.IllegalArgumentException - if any of the tensor dimensions are not present in the input tensor