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

Method forward2

axlearn/common/module_test.py:354–363  ·  view source on GitHub ↗
(self, x: Tensor)

Source from the content-addressed store, hash-verified

352 return x
353
354 def forward2(self, x: Tensor) -> Tensor:
355 cfg = self.config
356 x = self.inc(x)
357 x = self.inc(x)
358 if cfg.child is not None:
359 # Can also call children's method directly, if each child is invoked only once and
360 # the method is wrapped for auto child context.
361 x = self.child1.forward2(x)
362 x = self.child2.forward2(x)
363 return x
364
365 def inc(self, x: Tensor) -> Tensor:
366 self.add_summary("x", x)

Callers

nothing calls this directly

Calls 1

incMethod · 0.95

Tested by

no test coverage detected