MCPcopy Create free account
hub / github.com/apple/axlearn / create_opt_params

Method create_opt_params

axlearn/common/optimizers_test.py:392–400  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

390 params = jnp.asarray([0, 1, 2, -3], dtype=jnp.float32)
391
392 def create_opt_params(x):
393 return jax.tree.map(
394 lambda y: OptParam(
395 value=y,
396 factorization_spec=None,
397 weight_decay_scale=1.0,
398 ),
399 x,
400 )
401
402 state = optimizer.init(create_opt_params(params))
403

Callers

nothing calls this directly

Calls 2

OptParamClass · 0.90
mapMethod · 0.80

Tested by

no test coverage detected