MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / reduce_min

Function reduce_min

tensorflow/python/ops/math_ops.py:2095–2126  ·  view source on GitHub ↗

Computes the minimum of elements across dimensions of a tensor. Reduces `input_tensor` along the dimensions given in `axis`. Unless `keepdims` is true, the rank of the tensor is reduced by 1 for each entry in `axis`. If `keepdims` is true, the reduced dimensions are retained with length 1.

(input_tensor, axis=None, keepdims=False, name=None)

Source from the content-addressed store, hash-verified

2093@tf_export("math.reduce_min", "reduce_min", v1=[])
2094@dispatch.add_dispatch_support
2095def reduce_min(input_tensor, axis=None, keepdims=False, name=None):
2096 """Computes the minimum of elements across dimensions of a tensor.
2097
2098 Reduces `input_tensor` along the dimensions given in `axis`.
2099 Unless `keepdims` is true, the rank of the tensor is reduced by 1 for each
2100 entry in `axis`. If `keepdims` is true, the reduced dimensions
2101 are retained with length 1.
2102
2103 If `axis` is None, all dimensions are reduced, and a
2104 tensor with a single element is returned.
2105
2106 Args:
2107 input_tensor: The tensor to reduce. Should have real numeric type.
2108 axis: The dimensions to reduce. If `None` (the default), reduces all
2109 dimensions. Must be in the range `[-rank(input_tensor),
2110 rank(input_tensor))`.
2111 keepdims: If true, retains reduced dimensions with length 1.
2112 name: A name for the operation (optional).
2113
2114 Returns:
2115 The reduced tensor.
2116
2117 @compatibility(numpy)
2118 Equivalent to np.min
2119 @end_compatibility
2120 """
2121 keepdims = False if keepdims is None else keepdims
2122 return _may_reduce_to_scalar(
2123 keepdims, axis,
2124 gen_math_ops._min(
2125 input_tensor, _ReductionDims(input_tensor, axis), keepdims,
2126 name=name))
2127
2128
2129@tf_export(v1=["math.reduce_max", "reduce_max"])

Callers 1

reduce_min_v1Function · 0.70

Calls 2

_may_reduce_to_scalarFunction · 0.85
_ReductionDimsFunction · 0.85

Tested by

no test coverage detected