def max(node, reduction_axes=None, name=None): # type: (Node, Iterable[int], str) -> Node """Max-reduction operation on input tensor, eliminating the specified reduction axes. :param node: The tensor we want to max-reduce. :param reduction_axes: The axes to eliminate through max operation. :param name: Optional name for output node. """ return Max(node, AxisSet(get_reduction_axes(node, reduction_axes)))
def min(node, reduction_axes=None, name=None): # type: (Node, Iterable[int], str) -> Node """Min-reduction operation on input tensor, eliminating the specified reduction axes. :param node: The tensor we want to max-reduce. :param reduction_axes: The axes to eliminate through min operation. :param name: Optional name for output node. """ return Min(node, AxisSet(get_reduction_axes(node, reduction_axes)))
def prod(node, reduction_axes=None, name=None): # type: (Node, Iterable[int], str) -> Node """Product-reduction operation on input tensor, eliminating the specified reduction axes. :param node: The tensor we want to product-reduce. :param reduction_axes: The axes to eliminate through product operation. :param name: Optional name for output node. :return: The new node performing product-reduction operation. """ return Product(node, AxisSet(get_reduction_axes(node, reduction_axes)))
def sum(node, reduction_axes=None, name=None): # type: (Node, Iterable[int], str) -> Node """Perform element-wise sums of the input tensor, eliminating the specified reduction axes. :param node: The node providing data for operation. :param reduction_axes: The axes to eliminate through summation. :param name: The optional new name for ouptut node. :return: The new node performing summation along `reduction_axes` element-wise. """ return Sum(node, AxisSet(get_reduction_axes(node, reduction_axes)))
def prod(node, reduction_axes=None, name=None): # type: (Node, Iterable[int], str) -> Node """Product-reduction operation on input tensor, eliminating the specified reduction axes. :param node: The tensor we want to product-reduce. :param reduction_axes: The axes to eliminate through product operation. :param name: Optional name for output node. :return: The new node performing product-reduction operation. """ return Product(node, AxisSet(get_reduction_axes(node, reduction_axes)))
def sum(node, reduction_axes=None, name=None): # type: (Node, Iterable[int], str) -> Node """Perform element-wise sums of the input tensor, eliminating the specified reduction axes. :param node: The node providing data for operation. :param reduction_axes: The axes to eliminate through summation. :param name: The optional new name for ouptut node. :return: The new node performing summation along `reduction_axes` element-wise. """ return Sum(node, AxisSet(get_reduction_axes(node, reduction_axes)))