Returns the minimum of an array or minimum value along an axis.
View aliases
Main aliases
tf.keras.ops.amin(
x, axis=None, keepdims=False
)
Returns | |
---|---|
An array with the minimum value. If axis=None , the result is a scalar
value representing the minimum element in the entire array. If axis is
given, the result is an array with the minimum values along
the specified axis.
|
Examples:
x = keras.ops.convert_to_tensor([1, 3, 5, 2, 3, 6])
keras.ops.amin(x)
array(1, dtype=int32)
x = keras.ops.convert_to_tensor([[1, 6, 8], [7, 5, 3]])
keras.ops.amin(x, axis=0)
array([1,5,3], dtype=int32)
x = keras.ops.convert_to_tensor([[1, 6, 8], [7, 5, 3]])
keras.ops.amin(x, axis=1, keepdims=True)
array([[1],[3]], dtype=int32)