Missed TensorFlow World? Check out the recap. Learn more

tf.keras.utils.normalize

View source on GitHub

Normalizes a Numpy array.

Aliases:

  • tf.compat.v1.keras.utils.normalize
  • tf.compat.v2.keras.utils.normalize
tf.keras.utils.normalize(
    x,
    axis=-1,
    order=2
)

Arguments:

  • x: Numpy array to normalize.
  • axis: axis along which to normalize.
  • order: Normalization order (e.g. 2 for L2 norm).

Returns:

A normalized copy of the array.