Bitwise reduction (logical AND). Arguments: x: Tensor or variable. axis: axis along which to perform the reduction. keepdims: whether the drop or broadcast the reduction axes. Returns: A uint8 tensor (0s and 1s).
(x, axis=None, keepdims=False)
| 2021 | |
| 2022 | @keras_export('keras.backend.all') |
| 2023 | def all(x, axis=None, keepdims=False): |
| 2024 | """Bitwise reduction (logical AND). |
| 2025 | |
| 2026 | Arguments: |
| 2027 | x: Tensor or variable. |
| 2028 | axis: axis along which to perform the reduction. |
| 2029 | keepdims: whether the drop or broadcast the reduction axes. |
| 2030 | |
| 2031 | Returns: |
| 2032 | A uint8 tensor (0s and 1s). |
| 2033 | """ |
| 2034 | x = math_ops.cast(x, dtypes_module.bool) |
| 2035 | return math_ops.reduce_all(x, axis, keepdims) |
| 2036 | |
| 2037 | |
| 2038 | @keras_export('keras.backend.argmax') |