示例#1
0
  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')
示例#2
0
    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')
示例#3
0
  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'))
示例#4
0
  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'))
示例#5
0
    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'))
示例#6
0
    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'))