Exemplo n.º 1
0
    def test(self):
        unpack_lt = ops.unpack(self.original_lt)[0]
        golden_lt = core.LabeledTensor(
            array_ops.unstack(self.original_lt.tensor)[0],
            [self.a1, self.a2, self.a3])

        self.assertLabeledTensorsEqual(unpack_lt, golden_lt)
Exemplo n.º 2
0
    def test_axis(self):
        unpack_lt = ops.unpack(self.original_lt, axis_name='z')[0]
        golden_lt = core.LabeledTensor(
            array_ops.unstack(self.original_lt.tensor, axis=2)[0],
            [self.a0, self.a1, self.a3])

        self.assertLabeledTensorsEqual(unpack_lt, golden_lt)
Exemplo n.º 3
0
  def test_axis(self):
    unpack_lt = ops.unpack(self.original_lt, axis_name='z')[0]
    golden_lt = core.LabeledTensor(
        array_ops.unstack(
            self.original_lt.tensor, axis=2)[0], [self.a0, self.a1, self.a3])

    self.assertLabeledTensorsEqual(unpack_lt, golden_lt)
Exemplo n.º 4
0
  def test(self):
    unpack_lt = ops.unpack(self.original_lt)[0]
    golden_lt = core.LabeledTensor(
        array_ops.unstack(self.original_lt.tensor)[0],
        [self.a1, self.a2, self.a3])

    self.assertLabeledTensorsEqual(unpack_lt, golden_lt)
Exemplo n.º 5
0
 def test_invalid_input(self):
     with self.assertRaises(ValueError):
         ops.unpack(self.original_lt, axis_name='not_found')
Exemplo n.º 6
0
 def test_name(self):
     unpack_lts = ops.unpack(self.original_lt)
     for t in unpack_lts:
         self.assertIn('lt_unpack', t.name)
Exemplo n.º 7
0
 def test_invalid_input(self):
   with self.assertRaises(ValueError):
     ops.unpack(self.original_lt, axis_name='not_found')
Exemplo n.º 8
0
 def test_name(self):
   unpack_lts = ops.unpack(self.original_lt)
   for t in unpack_lts:
     self.assertIn('lt_unpack', t.name)