MCPcopy
hub / github.com/deepspeedai/DeepSpeed / MyModule

Class MyModule

tests/torch_compile/test_compile.py:39–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37
38
39class MyModule(torch.nn.Module):
40
41 def __init__(self, *args, **kwargs) -> None:
42 super().__init__(*args, **kwargs)
43 self.fc0 = torch.nn.Linear(1024, 256, bias=False)
44 self.fc1 = torch.nn.Linear(256, 256, bias=False)
45 self.dropout = torch.nn.Dropout(0.5)
46
47 def forward(self, data, residual):
48 output = residual + self.fc1(self.fc0(self.dropout(data))) * 0.5
49 return output
50
51
52model = MyModule()

Callers 1

test_compile.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…