MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / test_script

Method test_script

tests/networks/nets/test_net_adapter.py:57–64  ·  view source on GitHub ↗
(self, input_param, input_shape, expected_shape)

Source from the content-addressed store, hash-verified

55
56 @parameterized.expand([TEST_CASE_0])
57 def test_script(self, input_param, input_shape, expected_shape):
58 spatial_dims = input_param["dim"]
59 stride = (1, 2, 2)[:spatial_dims]
60 model = resnet18(spatial_dims=spatial_dims, conv1_t_stride=stride)
61 input_param["model"] = model
62 net = NetAdapter(**input_param).to("cpu")
63 test_data = torch.randn(input_shape).to("cpu")
64 test_script_save(net, test_data)
65
66
67if __name__ == "__main__":

Callers

nothing calls this directly

Calls 3

resnet18Function · 0.90
NetAdapterClass · 0.90
test_script_saveFunction · 0.90

Tested by

no test coverage detected