Compute the L1 and L2 norms of a weight vector together with the matching penalty terms, to build intuition about sparsity and shrinkage.
L1 倾向稀疏,L2 倾向小权重。