Ejemplo n.º 1
0
 def test(self):
     cast_lt = ops.cast(self.original_lt, dtypes.float16)
     golden_lt = core.LabeledTensor(
         math_ops.cast(self.original_lt.tensor, dtypes.float16),
         self.original_lt.axes)
     self.assertLabeledTensorsEqual(cast_lt, golden_lt)
Ejemplo n.º 2
0
 def test(self):
   cast_lt = ops.cast(self.original_lt, dtypes.float16)
   golden_lt = core.LabeledTensor(
       math_ops.cast(self.original_lt.tensor, dtypes.float16),
       self.original_lt.axes)
   self.assertLabeledTensorsEqual(cast_lt, golden_lt)
Ejemplo n.º 3
0
 def test_name(self):
     cast_lt = ops.cast(self.original_lt, dtypes.float16)
     self.assertIn('lt_cast', cast_lt.name)
Ejemplo n.º 4
0
 def test_name(self):
   cast_lt = ops.cast(self.original_lt, dtypes.float16)
   self.assertIn('lt_cast', cast_lt.name)