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

Class SimpleModel

tests/test_python_api.py:82–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80
81def test_dynamic_batch_size():
82 class SimpleModel(torch.nn.Module):
83 def __init__(self):
84 super(SimpleModel, self).__init__()
85
86 def forward(self, x):
87 return x + 2
88
89 net = SimpleModel()
90 dummy_input = torch.randn(2, 3, 4, 5)

Callers 4

test_dynamic_batch_sizeFunction · 0.85
test_unused_outputFunction · 0.85

Calls

no outgoing calls

Tested by 4

test_dynamic_batch_sizeFunction · 0.68
test_unused_outputFunction · 0.68