Maximum value in a tensor. Arguments: x: A tensor or variable. axis: An integer, the axis to find maximum values. keepdims: A boolean, whether to keep the dimensions or not. If `keepdims` is `False`, the rank of the tensor is reduced by 1. If `keepdims` is `T
(x, axis=None, keepdims=False)
| 1845 | |
| 1846 | @keras_export('keras.backend.max') |
| 1847 | def max(x, axis=None, keepdims=False): |
| 1848 | """Maximum value in a tensor. |
| 1849 | |
| 1850 | Arguments: |
| 1851 | x: A tensor or variable. |
| 1852 | axis: An integer, the axis to find maximum values. |
| 1853 | keepdims: A boolean, whether to keep the dimensions or not. |
| 1854 | If `keepdims` is `False`, the rank of the tensor is reduced |
| 1855 | by 1. If `keepdims` is `True`, |
| 1856 | the reduced dimension is retained with length 1. |
| 1857 | |
| 1858 | Returns: |
| 1859 | A tensor with maximum values of `x`. |
| 1860 | """ |
| 1861 | return math_ops.reduce_max(x, axis, keepdims) |
| 1862 | |
| 1863 | |
| 1864 | @keras_export('keras.backend.min') |
no outgoing calls