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

Function reduce_all_v1

tensorflow/python/ops/math_ops.py:2214–2261  ·  view source on GitHub ↗

Computes the "logical and" 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 leng

(input_tensor,
                  axis=None,
                  keepdims=None,
                  name=None,
                  reduction_indices=None,
                  keep_dims=None)

Source from the content-addressed store, hash-verified

2212 "keep_dims is deprecated, use keepdims instead",
2213 "keep_dims")
2214def reduce_all_v1(input_tensor,
2215 axis=None,
2216 keepdims=None,
2217 name=None,
2218 reduction_indices=None,
2219 keep_dims=None):
2220 """Computes the "logical and" of elements across dimensions of a tensor.
2221
2222 Reduces `input_tensor` along the dimensions given in `axis`.
2223 Unless `keepdims` is true, the rank of the tensor is reduced by 1 for each
2224 entry in `axis`. If `keepdims` is true, the reduced dimensions
2225 are retained with length 1.
2226
2227 If `axis` is None, all dimensions are reduced, and a
2228 tensor with a single element is returned.
2229
2230 For example:
2231
2232 ```python
2233 x = tf.constant([[True, True], [False, False]])
2234 tf.reduce_all(x) # False
2235 tf.reduce_all(x, 0) # [False, False]
2236 tf.reduce_all(x, 1) # [True, False]
2237 ```
2238
2239 Args:
2240 input_tensor: The boolean tensor to reduce.
2241 axis: The dimensions to reduce. If `None` (the default), reduces all
2242 dimensions. Must be in the range `[-rank(input_tensor),
2243 rank(input_tensor))`.
2244 keepdims: If true, retains reduced dimensions with length 1.
2245 name: A name for the operation (optional).
2246 reduction_indices: The old (deprecated) name for axis.
2247 keep_dims: Deprecated alias for `keepdims`.
2248
2249 Returns:
2250 The reduced tensor.
2251
2252 @compatibility(numpy)
2253 Equivalent to np.all
2254 @end_compatibility
2255 """
2256 axis = deprecation.deprecated_argument_lookup("axis", axis,
2257 "reduction_indices",
2258 reduction_indices)
2259 keepdims = deprecation.deprecated_argument_lookup("keepdims", keepdims,
2260 "keep_dims", keep_dims)
2261 return reduce_all(input_tensor, axis, keepdims, name)
2262
2263
2264@tf_export("reduce_all", "math.reduce_all", v1=[])

Callers

nothing calls this directly

Calls 1

reduce_allFunction · 0.70

Tested by

no test coverage detected