Code: Select all
def scale_by_lbfgs(
...
def update_fn(
...
weight = jnp.where(
vdot_diff_params_updates == 0.0, 0.0, 1.0 / vdot_diff_params_updates
)
Code: Select all
def scale_by_lbfgs(
...
def update_fn(
...
weight = jnp.where(
vdot_diff_params_updates == 0.0, 0.0, 1.0 / vdot_diff_params_updates
)