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

Method test_script

tests/networks/test_varnet.py:48–58  ·  view source on GitHub ↗
(self, coil_sens_model, refinement_model, num_cascades, input_shape, expected_shape)

Source from the content-addressed store, hash-verified

46
47 @parameterized.expand(TESTS)
48 def test_script(self, coil_sens_model, refinement_model, num_cascades, input_shape, expected_shape):
49 net = VariationalNetworkModel(coil_sens_model, refinement_model, num_cascades)
50
51 mask_shape = [1 for _ in input_shape]
52 mask_shape[-2] = input_shape[-2]
53 mask = torch.zeros(mask_shape)
54 mask[..., mask_shape[-2] // 2 - 5 : mask_shape[-2] // 2 + 5, :] = 1
55
56 test_data = torch.randn(input_shape)
57
58 test_script_save(net, test_data, mask.bool())
59
60
61if __name__ == "__main__":

Callers

nothing calls this directly

Calls 2

test_script_saveFunction · 0.90

Tested by

no test coverage detected