def test_unsupported_exception(self):
        """Expect an exception when trying to wrap an unsupported module"""

        class UnsupportedModule(torch.nn.Module):
            def __init__(self):
                super().__init__()
                self.weights = torch.nn.Parameter(torch.rand(10, 10))

        with self.assertRaises(ValueError):
            PackNetModel(UnsupportedModule())

        with self.assertRaises(ValueError):
            PackNetModel(torch.nn.BatchNorm2d(10))
Expect an exception when trying to wrap an unsupported module
tests/models/test_packnet.py