def test_dataformat(self):
    bn1d = BatchNorm1d(data_format='channels_first', num_features=32)
    bn2d = BatchNorm2d(data_format='channels_first', num_features=32)
    bn3d = BatchNorm3d(data_format='channels_first', num_features=32)
    bn = BatchNorm(data_format='channels_first')
    try:
        bn_fail = BatchNorm1d(data_format='xyz', num_features=32)
    except Exception as e:
        self.assertIsInstance(e, ValueError)
        print(e)
def test_dataformat(self):
    bn1d = BatchNorm1d(data_format='channels_first', num_features=32)
    bn2d = BatchNorm2d(data_format='channels_first', num_features=32)
    bn3d = BatchNorm3d(data_format='channels_first', num_features=32)
    bn = BatchNorm(data_format='channels_first')
    try:
        bn_fail = BatchNorm1d(data_format='xyz', num_features=32)
    except Exception as e:
        self.assertIsInstance(e, ValueError)
        print(e)