diff --git a/tensorflow/examples/adding_an_op/fact_test.py b/tensorflow/examples/adding_an_op/fact_test.py index 46beaebe0cc..6b3b8d3d031 100644 --- a/tensorflow/examples/adding_an_op/fact_test.py +++ b/tensorflow/examples/adding_an_op/fact_test.py @@ -27,7 +27,7 @@ class FactTest(tf.test.TestCase): @test_util.run_deprecated_v1 def test(self): with self.cached_session(): - print(tf.user_ops.my_fact().eval()) + print(tf.compat.v1.user_ops.my_fact().eval()) if __name__ == '__main__': diff --git a/tensorflow/examples/adding_an_op/zero_out_1_test.py b/tensorflow/examples/adding_an_op/zero_out_1_test.py index a8513c72831..61e6f2dc8f2 100644 --- a/tensorflow/examples/adding_an_op/zero_out_1_test.py +++ b/tensorflow/examples/adding_an_op/zero_out_1_test.py @@ -48,7 +48,8 @@ class ZeroOut1Test(tf.test.TestCase): def testLoadTwice(self): zero_out_loaded_again = tf.load_op_library(os.path.join( - tf.resource_loader.get_data_files_path(), 'zero_out_op_kernel_1.so')) + tf.compat.v1.resource_loader.get_data_files_path(), + 'zero_out_op_kernel_1.so')) self.assertEqual(zero_out_loaded_again, zero_out_op_1._zero_out_module) diff --git a/tensorflow/examples/adding_an_op/zero_out_2_test.py b/tensorflow/examples/adding_an_op/zero_out_2_test.py index 650fd9546b5..481742b5b54 100644 --- a/tensorflow/examples/adding_an_op/zero_out_2_test.py +++ b/tensorflow/examples/adding_an_op/zero_out_2_test.py @@ -47,7 +47,7 @@ class ZeroOut2Test(tf.test.TestCase): shape = (5,) x = tf.constant([5, 4, 3, 2, 1], dtype=tf.float32) y = zero_out_op_2.zero_out(x) - err = tf.test.compute_gradient_error(x, shape, y, shape) + err = tf.compat.v1.test.compute_gradient_error(x, shape, y, shape) self.assertLess(err, 1e-4) @test_util.run_deprecated_v1 @@ -56,7 +56,7 @@ class ZeroOut2Test(tf.test.TestCase): shape = (2, 3) x = tf.constant([[6, 5, 4], [3, 2, 1]], dtype=tf.float32) y = zero_out_op_2.zero_out(x) - err = tf.test.compute_gradient_error(x, shape, y, shape) + err = tf.compat.v1.test.compute_gradient_error(x, shape, y, shape) self.assertLess(err, 1e-4) diff --git a/tensorflow/examples/adding_an_op/zero_out_op_1.py b/tensorflow/examples/adding_an_op/zero_out_op_1.py index 57980c3e2aa..c2ea8b1ec52 100644 --- a/tensorflow/examples/adding_an_op/zero_out_op_1.py +++ b/tensorflow/examples/adding_an_op/zero_out_op_1.py @@ -22,7 +22,7 @@ import os.path import tensorflow as tf _zero_out_module = tf.load_op_library( - os.path.join(tf.resource_loader.get_data_files_path(), + os.path.join(tf.compat.v1.resource_loader.get_data_files_path(), 'zero_out_op_kernel_1.so')) zero_out = _zero_out_module.zero_out namespace_zero_out = _zero_out_module.namespace_zero_out diff --git a/tensorflow/examples/adding_an_op/zero_out_op_2.py b/tensorflow/examples/adding_an_op/zero_out_op_2.py index ba1e8b4d62c..2b5a7547616 100644 --- a/tensorflow/examples/adding_an_op/zero_out_op_2.py +++ b/tensorflow/examples/adding_an_op/zero_out_op_2.py @@ -22,7 +22,7 @@ import os.path import tensorflow as tf _zero_out_module = tf.load_op_library( - os.path.join(tf.resource_loader.get_data_files_path(), + os.path.join(tf.compat.v1.resource_loader.get_data_files_path(), 'zero_out_op_kernel_2.so')) zero_out = _zero_out_module.zero_out zero_out2 = _zero_out_module.zero_out2 diff --git a/tensorflow/examples/adding_an_op/zero_out_op_3.py b/tensorflow/examples/adding_an_op/zero_out_op_3.py index 4354ecaf5a6..e45217309a7 100644 --- a/tensorflow/examples/adding_an_op/zero_out_op_3.py +++ b/tensorflow/examples/adding_an_op/zero_out_op_3.py @@ -22,6 +22,6 @@ import os.path import tensorflow as tf _zero_out_module = tf.load_op_library( - os.path.join(tf.resource_loader.get_data_files_path(), + os.path.join(tf.compat.v1.resource_loader.get_data_files_path(), 'zero_out_op_kernel_3.so')) zero_out = _zero_out_module.zero_out diff --git a/tensorflow/examples/speech_commands/BUILD b/tensorflow/examples/speech_commands/BUILD index afb9af6913c..e9589aeac80 100644 --- a/tensorflow/examples/speech_commands/BUILD +++ b/tensorflow/examples/speech_commands/BUILD @@ -62,6 +62,7 @@ tf_py_test( ], tags = [ "no_pip", # b/131330719 + "v1only", # uses contrib ], ) @@ -98,6 +99,7 @@ tf_py_test( ], tags = [ "no_pip", # b/131330719 + "v1only", # uses contrib ], ) @@ -144,6 +146,7 @@ tf_py_test( ], tags = [ "no_pip", # b/131330719 + "v1only", # uses contrib ], ) @@ -187,6 +190,7 @@ tf_py_test( ], tags = [ "no_pip", # b/131330719 + "v1only", # uses contrib ], ) @@ -230,6 +234,7 @@ tf_py_test( ], tags = [ "no_pip", # b/131330719 + "v1only", # uses contrib ], ) @@ -284,6 +289,7 @@ tf_py_test( ], tags = [ "no_pip", # b/131330719 + "v1only", # uses contrib ], )