diff --git a/tensorflow/python/distribute/tpu_strategy_test.py b/tensorflow/python/distribute/tpu_strategy_test.py index bec96e4eece..4b88ae7134a 100644 --- a/tensorflow/python/distribute/tpu_strategy_test.py +++ b/tensorflow/python/distribute/tpu_strategy_test.py @@ -137,7 +137,7 @@ class TPUStrategyTest(test.TestCase): def computation(): return random_ops.random_gamma([10], [0.5, 1.5]) - return strategy.experimental_run_v2(computation) + return strategy.run(computation) with self.assertRaisesRegexp(errors.InvalidArgumentError, "TPU compilation failed"): @@ -149,7 +149,7 @@ class TPUStrategyTest(test.TestCase): def computation(): return random_ops.random_normal([10]) - return strategy.experimental_run_v2(computation) + return strategy.run(computation) good_run() diff --git a/tensorflow/python/tpu/tpu.py b/tensorflow/python/tpu/tpu.py index 5c3a61d5d8d..fe8fac794db 100644 --- a/tensorflow/python/tpu/tpu.py +++ b/tensorflow/python/tpu/tpu.py @@ -223,7 +223,7 @@ def tpu_replicated_input_resolver(op, resource_reads, resource_writes): return False # Replace tensors in `resource_inputs` which are outputs of TPUReplicatedInput # with the actual replicated inputs. This allows ACD to correct add control - # deps when there are multiple calls to `experimental_run_v2` in a + # deps when there are multiple calls to `run` in a # `tf.function`. def replace_with_unreplicated_resources(resource_inputs): """Replaces handles in `resource_inputs` with their unreplicated inputs.""" diff --git a/tensorflow/python/training/experimental/loss_scaling_gradient_tape.py b/tensorflow/python/training/experimental/loss_scaling_gradient_tape.py index a2502b8a43f..730f3bef9bc 100644 --- a/tensorflow/python/training/experimental/loss_scaling_gradient_tape.py +++ b/tensorflow/python/training/experimental/loss_scaling_gradient_tape.py @@ -40,7 +40,7 @@ def _convert_to_per_replicas(distribution, values): Returns: `values`, but each element has been converted to a PerReplica value. """ - return distribution.experimental_run_v2( + return distribution.run( lambda values: [array_ops.identity(v) for v in values], args=(values,) )