Fix l2norm nan bug during gradient calculation by not using linalg.norm which has known issue with l2 norm of zero.
Fix l2norm nan bug during gradient calculation by not using linalg.norm which has known issue with l2 norm of zero.

PiperOrigin-RevId: 427556695

tensorflow/lingvo,tensorflow/lingvo,tensorflow/lingvo,tensorflow/lingvo