MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / __init__

Method __init__

tests/unit/compile/test_tp_compile.py:48–51  ·  view source on GitHub ↗
(self, nlayers=2)

Source from the content-addressed store, hash-verified

46class MLPModel(torch.nn.Module):
47
48 def __init__(self, nlayers=2):
49 super().__init__()
50 self.layers = torch.nn.ModuleList([MLPBlock() for _ in range(nlayers)])
51 self.head = torch.nn.Linear(HIDDEN_DIM, HIDDEN_DIM, bias=False)
52
53 def forward(self, x):
54 for layer in self.layers:

Callers

nothing calls this directly

Calls 2

MLPBlockClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected