示例#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)
示例#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)
示例#3
0
 def test_name(self):
     cast_lt = ops.cast(self.original_lt, dtypes.float16)
     self.assertIn('lt_cast', cast_lt.name)
示例#4
0
 def test_name(self):
   cast_lt = ops.cast(self.original_lt, dtypes.float16)
   self.assertIn('lt_cast', cast_lt.name)