def test_padding_arg_invalid_format(self): pad_h = 2 pad_w = 3 with self.assertRaises(ValueError): ops._padding_arg(pad_h, pad_w, 'INVALID')
def test_padding_arg_specify_format(self): pad_h = 2 pad_w = 3 self.assertListEqual([[pad_h, pad_h], [pad_w, pad_w], [0, 0]], ops._padding_arg(pad_h, pad_w, 'HWC'))
def test_padding_arg(self): pad_h = 2 pad_w = 3 self.assertListEqual([[0, 0], [pad_h, pad_h], [pad_w, pad_w], [0, 0]], ops._padding_arg(pad_h, pad_w, 'NHWC'))