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

Method __init__

tests/unit/v1/zero/test_reflow.py:2146–2150  ·  view source on GitHub ↗
(self, width=16)

Source from the content-addressed store, hash-verified

2144class ConditionalGradientModel(torch.nn.Module):
2145
2146 def __init__(self, width=16):
2147 super().__init__()
2148 self.scale = torch.nn.Parameter(torch.ones(1))
2149 self.always = torch.nn.Linear(width, width)
2150 self.optional = torch.nn.Linear(width, width)
2151
2152 def forward(self, inputs, use_optional):
2153 result = self.always(inputs)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected