This method should only be used in tests written with tf.test.TestCase.
classMyTest(tf.test.TestCase):deftest_add_on_gpu(self):ifnottf.test.is_built_with_gpu_support():self.skipTest("test is only applicable on GPU")withtf.device(tf.test.gpu_device_name()):self.assertEqual(tf.math.add(1.0,2.0),3.0)
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-01-23 UTC."],[],[]]