| 40 | kernel_size = 3 |
| 41 | |
| 42 | class TestNet(Module): |
| 43 | def __init__(self, groups, bias): |
| 44 | super().__init__() |
| 45 | self.quant = QuantStub() |
| 46 | self.dequant = DequantStub() |
| 47 | self.conv_bn = ConvBn2d( |
| 48 | in_channels, out_channels, kernel_size, groups=groups, bias=bias, |
| 49 | ) |
| 50 | |
| 51 | def forward(self, inp): |
| 52 | out = self.quant(inp) |
| 53 | out = self.conv_bn(out) |
| 54 | out = self.dequant(out) |
| 55 | return out |
| 56 | |
| 57 | inputs = tensor(np.random.randn(4, in_channels, 32, 32).astype(np.float32)) |
| 58 | for groups, bias in product([1, 4], [True, False]): |
no outgoing calls