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

Method _create_layer_parameter_specs

axlearn/common/layers.py:1547–1564  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1545 cfg = self.config
1546 return {
1547 "count": ParameterSpec(
1548 shape=[],
1549 dtype=jnp.int32,
1550 mesh_axes=(None,),
1551 initializer=constant_initializer(0),
1552 weight_decay_scale=0,
1553 ),
1554 "value": ParameterSpec(
1555 shape=cfg.shape,
1556 dtype=jnp.float32,
1557 mesh_axes=(None,),
1558 initializer=constant_initializer(0.0),
1559 weight_decay_scale=0,
1560 ),
1561 }
1562
1563 def forward(self, x: Tensor) -> Tensor:
1564 """Computes a moving average of `x`.
1565
1566 The moving average updates will be set in OutputCollection.state_updates.
1567

Callers

nothing calls this directly

Calls 2

ParameterSpecClass · 0.90
constant_initializerFunction · 0.90

Tested by

no test coverage detected