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