diff options
author | Anna R <annarev@google.com> | 2018-10-01 11:53:27 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-10-01 11:58:12 -0700 |
commit | f1fd53748b99532b2572b8909efcd4f5c06ce28d (patch) | |
tree | 16ae93334d4b10a3bf7cfb1f088efd725857fb54 /tensorflow/python/framework | |
parent | 7cabc6be4e32dfb7f42c7f5e33549984bfdb68a3 (diff) |
Updating function and class tf_export decorators for endpoints according to
https://github.com/tensorflow/community/pull/16.
In addition to the changes in the doc, I made the following updates (these changes make sense to me and I didn't notice them when compiling the doc):
* deprecate saved_model.builder.SavedModelBuilder - replaced with saved_model.SavedModelBuilder
* deprecate python_io.tf_record_iterator - replaced with io.tf_record_iterator
* deprecate python_io.TFRecordWriter - replaced with io.TFRecordWriter
* move reduce_join to tf.string
PiperOrigin-RevId: 215253944
Diffstat (limited to 'tensorflow/python/framework')
-rw-r--r-- | tensorflow/python/framework/dtypes.py | 4 | ||||
-rw-r--r-- | tensorflow/python/framework/errors_impl.py | 6 | ||||
-rw-r--r-- | tensorflow/python/framework/graph_io.py | 2 | ||||
-rw-r--r-- | tensorflow/python/framework/importer.py | 2 | ||||
-rw-r--r-- | tensorflow/python/framework/random_seed.py | 6 | ||||
-rw-r--r-- | tensorflow/python/framework/sparse_tensor.py | 2 |
6 files changed, 13 insertions, 9 deletions
diff --git a/tensorflow/python/framework/dtypes.py b/tensorflow/python/framework/dtypes.py index c3f70df7d8..64d3b42d89 100644 --- a/tensorflow/python/framework/dtypes.py +++ b/tensorflow/python/framework/dtypes.py @@ -26,7 +26,7 @@ from tensorflow.python.util.tf_export import tf_export _np_bfloat16 = pywrap_tensorflow.TF_bfloat16_type() -@tf_export("DType") +@tf_export("dtypes.DType", "DType") class DType(object): """Represents the type of the elements in a `Tensor`. @@ -658,7 +658,7 @@ _PYTHON_TO_TF = { } -@tf_export("as_dtype") +@tf_export("dtypes.as_dtype", "as_dtype") def as_dtype(type_value): """Converts the given `type_value` to a `DType`. diff --git a/tensorflow/python/framework/errors_impl.py b/tensorflow/python/framework/errors_impl.py index 5af71f2cfb..8b303fa8a9 100644 --- a/tensorflow/python/framework/errors_impl.py +++ b/tensorflow/python/framework/errors_impl.py @@ -25,11 +25,13 @@ from tensorflow.core.lib.core import error_codes_pb2 from tensorflow.python import pywrap_tensorflow as c_api from tensorflow.python.framework import c_api_util from tensorflow.python.util import compat +from tensorflow.python.util import deprecation from tensorflow.python.util import tf_inspect from tensorflow.python.util.tf_export import tf_export -@tf_export("OpError", "errors.OpError") +@tf_export("errors.OpError", "OpError") +@deprecation.deprecated_endpoints("OpError") class OpError(Exception): """A generic error that is raised when TensorFlow execution fails. @@ -72,7 +74,7 @@ class OpError(Exception): or `Recv` op, there will be no corresponding `tf.Operation` object. In that case, this will return `None`, and you should - instead use the `tf.OpError.node_def` to + instead use the `tf.errors.OpError.node_def` to discover information about the op. Returns: diff --git a/tensorflow/python/framework/graph_io.py b/tensorflow/python/framework/graph_io.py index be30b16f5f..47e1344eae 100644 --- a/tensorflow/python/framework/graph_io.py +++ b/tensorflow/python/framework/graph_io.py @@ -27,7 +27,7 @@ from tensorflow.python.lib.io import file_io from tensorflow.python.util.tf_export import tf_export -@tf_export('train.write_graph') +@tf_export('io.write_graph', 'train.write_graph') def write_graph(graph_or_graph_def, logdir, name, as_text=True): """Writes a graph proto to a file. diff --git a/tensorflow/python/framework/importer.py b/tensorflow/python/framework/importer.py index e48e67c8a1..c6595918ae 100644 --- a/tensorflow/python/framework/importer.py +++ b/tensorflow/python/framework/importer.py @@ -329,7 +329,7 @@ def _SetDefaultAttrValues(node_def, op_def): node_def.attr[key].CopyFrom(attr_def.default_value) -@tf_export('import_graph_def') +@tf_export('graph_util.import_graph_def', 'import_graph_def') @deprecated_args(None, 'Please file an issue at ' 'https://github.com/tensorflow/tensorflow/issues if you depend' ' on this feature.', 'op_dict') diff --git a/tensorflow/python/framework/random_seed.py b/tensorflow/python/framework/random_seed.py index 2f9504889a..6f9f347a99 100644 --- a/tensorflow/python/framework/random_seed.py +++ b/tensorflow/python/framework/random_seed.py @@ -22,6 +22,7 @@ from __future__ import print_function from tensorflow.python.eager import context from tensorflow.python.framework import ops +from tensorflow.python.util import deprecation from tensorflow.python.util.tf_export import tf_export @@ -33,7 +34,8 @@ def _truncate_seed(seed): return seed % _MAXINT32 # Truncate to fit into 32-bit integer -@tf_export('get_seed') +@tf_export('random.get_seed', 'get_seed') +@deprecation.deprecated_endpoints('get_seed') def get_seed(op_seed): """Returns the local seeds an operation should use given an op-specific seed. @@ -80,7 +82,7 @@ def get_seed(op_seed): return seeds -@tf_export('set_random_seed') +@tf_export('random.set_random_seed', 'set_random_seed') def set_random_seed(seed): """Sets the graph-level random seed. diff --git a/tensorflow/python/framework/sparse_tensor.py b/tensorflow/python/framework/sparse_tensor.py index d1bdd9b80a..41ef2e11d1 100644 --- a/tensorflow/python/framework/sparse_tensor.py +++ b/tensorflow/python/framework/sparse_tensor.py @@ -33,7 +33,7 @@ _override_helper = ops._override_helper # pylint: enable=protected-access -@tf_export("SparseTensor") +@tf_export("sparse.SparseTensor", "SparseTensor") class SparseTensor(_TensorLike): """Represents a sparse tensor. |