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

Method __init__

tests/unit/runtime/zero/test_zero_offloadpp.py:20–23  ·  view source on GitHub ↗
(self, h_dim=1024, n_layers=2)

Source from the content-addressed store, hash-verified

18class NNModel(nn.Module):
19
20 def __init__(self, h_dim=1024, n_layers=2):
21 super(NNModel, self).__init__()
22 self.layers = nn.ModuleList([nn.Linear(h_dim, h_dim) for i in range(n_layers)])
23 self.cross_entropy_loss = nn.CrossEntropyLoss()
24
25 def forward(self, x, y):
26 for layer in self.layers:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected