aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/labeled_tensor
diff options
context:
space:
mode:
authorGravatar Charles Nicholson <nicholsonc@google.com>2017-04-21 10:59:14 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-04-21 12:09:42 -0700
commit8e5041918f2e709ded94e63fb1779d6bb363becb (patch)
tree5ec03d51d2e15b1247b68298b2ccd9138075513e /tensorflow/contrib/labeled_tensor
parentc3bf39b7a6c3cc41f209ac863c764498b503d4f5 (diff)
Introduce TFDecorator, a base class for Python TensorFlow decorators. Provides basic introspection and "unwrap" services, allowing tooling code to fully 'understand' the wrapped object.
Change: 153854044
Diffstat (limited to 'tensorflow/contrib/labeled_tensor')
-rw-r--r--tensorflow/contrib/labeled_tensor/python/ops/_typecheck.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/contrib/labeled_tensor/python/ops/_typecheck.py b/tensorflow/contrib/labeled_tensor/python/ops/_typecheck.py
index 4a939cb22c..80fa17ec1f 100644
--- a/tensorflow/contrib/labeled_tensor/python/ops/_typecheck.py
+++ b/tensorflow/contrib/labeled_tensor/python/ops/_typecheck.py
@@ -24,9 +24,9 @@ from __future__ import print_function
import collections
import functools
-import inspect
import re
+from tensorflow.python.util import tf_inspect
# used for register_type_abbreviation and _type_repr below.
_TYPE_ABBREVIATIONS = {}
@@ -230,7 +230,7 @@ def accepts(*types):
def check_accepts(f):
"""Check the types."""
- spec = inspect.getargspec(f)
+ spec = tf_inspect.getargspec(f)
num_function_arguments = len(spec.args)
if len(types) != num_function_arguments: