(self)
| 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 |
nothing calls this directly
no test coverage detected