MCPcopy Create free account
hub / github.com/onnxsim/onnxsim / MockModel

Class MockModel

tests/test_python_api.py:286–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284def test_perform_optimization_false():
285 def _create_dummy_model():
286 class MockModel(torch.nn.Module):
287 def __init__(self):
288 super(MockModel, self).__init__()
289 self.linear = torch.nn.Linear(10, 5)
290
291 def forward(self, x):
292 return self.linear(x)
293
294 model = MockModel()
295 dummy_input = torch.randn(1, 10)

Callers 1

_create_dummy_modelFunction · 0.70

Calls

no outgoing calls

Tested by 1

_create_dummy_modelFunction · 0.56