(self, input_param, input_shape, output_shape)
| 28 | class TestEMA(unittest.TestCase): |
| 29 | @parameterized.expand(TEST_CASES) |
| 30 | def test_ema_shape(self, input_param, input_shape, output_shape): |
| 31 | layer = EMAQuantizer(**input_param) |
| 32 | x = torch.randn(input_shape) |
| 33 | layer = layer.train() |
| 34 | outputs = layer(x) |
| 35 | self.assertEqual(outputs[0].shape, input_shape) |
| 36 | self.assertEqual(outputs[2].shape, output_shape) |
| 37 | |
| 38 | layer = layer.eval() |
| 39 | outputs = layer(x) |
| 40 | self.assertEqual(outputs[0].shape, input_shape) |
| 41 | self.assertEqual(outputs[2].shape, output_shape) |
| 42 | |
| 43 | @parameterized.expand(TEST_CASES) |
| 44 | def test_ema_quantize(self, input_param, input_shape, output_shape): |
nothing calls this directly
no test coverage detected