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

Method forward

axlearn/common/base_layer_test.py:60–67  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

58 }
59
60 def forward(self, x):
61 self.add_summary("x", x)
62 self._add_tensor_stats("x", x)
63 self.add_state_update("moving_mean", 0.1 * x + 0.9 * self.state["moving_mean"])
64 y = x - self.state["moving_mean"]
65 self.add_module_output("forward", y)
66 self._add_tensor_stats("y", y)
67 return y
68
69
70class _ParentLayer(BaseLayer):

Callers

nothing calls this directly

Calls 4

_add_tensor_statsMethod · 0.80
add_summaryMethod · 0.45
add_state_updateMethod · 0.45
add_module_outputMethod · 0.45

Tested by

no test coverage detected