tf.norm

Computes the norm of vectors, matrices, and tensors.

Used in the notebooks

Used in the guide Used in the tutorials

This function can compute several different vector norms (the 1-norm, the Euclidean or 2-norm, the inf-norm, and in general the p-norm for p > 0) and matrix norms (Frobenius, 1-norm, 2-norm and inf-norm).

tensor Tensor of types float32, float64, complex64, complex128
ord Order of the norm. Supported values are