View source on GitHub |
Adds methods that call original methods with eager_op_as_function enabled.
tf.test.with_eager_op_as_function(
cls=None, only_as_function=False
)
Example:
@test_util.with_eager_op_as_function class SessionTest(test.TestCase):
def testEnabledForEagerOpAsFunction(self): ...
@disable_eager_op_as_function("b/xyzabc") def testDisabledForEagerOpAsFunction(self): ...
Generated class:
class SessionTest(test.TestCase):
def testEnabledForEagerOpAsFunction(self): ...
def testEnabledForEagerOpAsFunctionWithEagerOpAsFunctionEnabled(self): // Enable run_eager_op_as_function // Reset context testEnabledForEagerOpAsFunction(self) // Disable run_eager_op_as_function // Reset context
def testDisabledForEagerOpAsFunction(self): ...
Returns | |
---|---|
cls with new test methods added. |