Optimize complexity regularization calculation when AdaNet lambda and beta are zero.
Optimize complexity regularization calculation when AdaNet lambda and beta are zero.

The complexity measurement operation may be expensive, so we should not compute it unless it will be used in the training objective.

PiperOrigin-RevId: 207550814

tensorflow/adanet,tensorflow/adanet