use jnp.where for beta2 conditionals to prevent recompilation when changing beta2
use jnp.where for beta2 conditionals to prevent recompilation when changing beta2

PiperOrigin-RevId: 471138599

google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research