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

Method forward

axlearn/common/repeat_test.py:46–52  ·  view source on GitHub ↗
(self, *, carry, forward_state)

Source from the content-addressed store, hash-verified

44 return jnp.zeros([batch_size], dtype=self.dtype())
45
46 def forward(self, *, carry, forward_state):
47 logging.info("_Layer: carry=%s forward_state=%s", shapes(carry), shapes(forward_state))
48 forward_state = forward_state + carry
49 self.add_summary("carry_mean", jnp.mean(carry))
50 self.add_module_output("state", forward_state)
51 self.add_state_update("inc", 2)
52 return carry + self.parameters["inc"], forward_state
53
54
55class _ComplicatedLayer(BaseLayer):

Callers

nothing calls this directly

Calls 4

shapesFunction · 0.90
add_summaryMethod · 0.45
add_module_outputMethod · 0.45
add_state_updateMethod · 0.45

Tested by

no test coverage detected