Env
import torch
\( f(a\mathbf{x}) = |a|f(\mathbf{x}) \)
\( f(\mathbf{x} + \mathbf{y}) \leq f(\mathbf{x}) + f(\mathbf{y}) \)
\( f(\mathbf{x}) \geq 0 \)
\( f(\mathbf{x}) = 0 \iff \mathbf{x} = \mathbf{0} \)
\(\|\mathbf{x}\|_2 = \|\mathbf{x}\| = \sqrt{\sum_{i=1}^n x_i^2} \)
u = torch.tensor([3.0, -4.0])
\(\|\mathbf{x}\|_1 = \sum_{i=1}^n |x_i| \)
u = torch.tensor([3.0, -4.0])
\(\|\mathbf{x}\|_p = \left(\sum_{i=1}^n |x_i|^p\right)^{1/p} \)
\(\|\mathbf{x}\|_F = \left(\sum_{i=1}^n |x_i|^2\right)^{1/2} \)
F = torch.arange(12, dtype = torch.float32).reshape(3,4)