def test_instancenorm(self):
    self._check_one_layer(nn.InstanceNorm1d(16, affine=True), torch.randn(64, 16, 10))
    self._check_one_layer(nn.InstanceNorm2d(16, affine=True), torch.randn(64, 16, 10, 9))
    self._check_one_layer(nn.InstanceNorm3d(16, affine=True), torch.randn(64, 16, 10, 9, 8))
def test_instancenorm(self):
    self._check_one_layer(nn.InstanceNorm1d(16, affine=True), torch.randn(64, 16, 10))
    self._check_one_layer(nn.InstanceNorm2d(16, affine=True), torch.randn(64, 16, 10, 9))
    self._check_one_layer(nn.InstanceNorm3d(16, affine=True), torch.randn(64, 16, 10, 9, 8))