diff --git a/tensorflow/python/framework/composite_tensor.py b/tensorflow/python/framework/composite_tensor.py index e3db9936389..22dbe7c7d88 100644 --- a/tensorflow/python/framework/composite_tensor.py +++ b/tensorflow/python/framework/composite_tensor.py @@ -25,8 +25,10 @@ import six from tensorflow.python import _pywrap_utils from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import from tensorflow.python.util import nest +from tensorflow.python.util.tf_export import tf_export +@tf_export("__internal__.CompositeTensor", v1=[]) @six.add_metaclass(abc.ABCMeta) class CompositeTensor(object): """Abstract base class for Tensor-like objects that are composed from Tensors. diff --git a/tensorflow/python/modules_with_exports.py b/tensorflow/python/modules_with_exports.py index 3f848797b08..75e67dbb1c6 100644 --- a/tensorflow/python/modules_with_exports.py +++ b/tensorflow/python/modules_with_exports.py @@ -55,6 +55,7 @@ from tensorflow.python.util.tf_export import tf_export # _internal APIs from tensorflow.python.framework.combinations import * +from tensorflow.python.framework.composite_tensor import * from tensorflow.python.framework.test_combinations import * from tensorflow.python.util.tf_decorator import make_decorator from tensorflow.python.util.tf_decorator import unwrap diff --git a/tensorflow/python/tools/api/generator/BUILD b/tensorflow/python/tools/api/generator/BUILD index 22aeebc2033..5e6172edd39 100644 --- a/tensorflow/python/tools/api/generator/BUILD +++ b/tensorflow/python/tools/api/generator/BUILD @@ -2,10 +2,8 @@ # Scripts used to generate TensorFlow Python API. load("//tensorflow:tensorflow.bzl", "py_test") -load("//tensorflow/python/tools/api/generator:api_init_files.bzl", "TENSORFLOW_API_INIT_FILES") -load("//tensorflow/python/tools/api/generator:api_init_files_v1.bzl", "TENSORFLOW_API_INIT_FILES_V1") -load("//tensorflow/python/tools/api/generator:api_init_files.bzl", "KERAS_API_INIT_FILES") -load("//tensorflow/python/tools/api/generator:api_init_files_v1.bzl", "KERAS_API_INIT_FILES_V1") +load("//tensorflow/python/tools/api/generator:api_init_files.bzl", "KERAS_API_INIT_FILES", "TENSORFLOW_API_INIT_FILES") +load("//tensorflow/python/tools/api/generator:api_init_files_v1.bzl", "KERAS_API_INIT_FILES_V1", "TENSORFLOW_API_INIT_FILES_V1") package( licenses = ["notice"], # Apache 2.0 @@ -85,6 +83,7 @@ py_test( ], deps = [ "//tensorflow/python:client_testlib", + "//tensorflow/python:composite_tensor", "//tensorflow/python:framework_combinations", "//tensorflow/python:modules_with_exports", "//tensorflow/python:no_contrib", diff --git a/tensorflow/tools/api/golden/v2/tensorflow.__internal__.-composite-tensor.pbtxt b/tensorflow/tools/api/golden/v2/tensorflow.__internal__.-composite-tensor.pbtxt new file mode 100644 index 00000000000..6d786d1cb29 --- /dev/null +++ b/tensorflow/tools/api/golden/v2/tensorflow.__internal__.-composite-tensor.pbtxt @@ -0,0 +1,8 @@ +path: "tensorflow.__internal__.CompositeTensor" +tf_class { + is_instance: "<class \'tensorflow.python.framework.composite_tensor.CompositeTensor\'>" + is_instance: "<type \'object\'>" + member_method { + name: "__init__" + } +} diff --git a/tensorflow/tools/api/golden/v2/tensorflow.__internal__.pbtxt b/tensorflow/tools/api/golden/v2/tensorflow.__internal__.pbtxt index ac5fe01d310..ea35bf3e1cc 100644 --- a/tensorflow/tools/api/golden/v2/tensorflow.__internal__.pbtxt +++ b/tensorflow/tools/api/golden/v2/tensorflow.__internal__.pbtxt @@ -1,5 +1,9 @@ path: "tensorflow.__internal__" tf_module { + member { + name: "CompositeTensor" + mtype: "<type \'type\'>" + } member { name: "decorator" mtype: "<type \'module\'>"