aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/ops/op_def_library.py
diff options
context:
space:
mode:
authorGravatar Manjunath Kudlur <keveman@gmail.com>2015-12-04 09:54:09 -0800
committerGravatar Manjunath Kudlur <keveman@gmail.com>2015-12-04 09:54:09 -0800
commit3dfd14421d71c1d6a79f72217cd7b6510cbcb38f (patch)
tree5cbbe42eb84edc815feb4a80e664d02d2b40f40e /tensorflow/python/ops/op_def_library.py
parent54a644f33f34a32fa2cb5e7a489c64540b16e166 (diff)
TensorFlow: upstream changes to git.
Change 109418220 Update WORKSPACE to use gmock.BUILD from google/protobuf instead of a duplicate. Update google/protobuf's commit hash to include damieng@'s commit. Change 109417314 TensorFlow: add .gitignore to ignore some in-tree modified files. Change 109400051 Optionally build full TensorFlow for Android. 1. --define ANDROID_TYPES=__ANDROID_TYPES_FULL__ to register ops for all types, not just float. Today this increases codesize by ~700K when compiled for ARM, though only for clients who request full type support. 2. Add more ops to android_extended_ops, sufficient to train on the linear regression baseball codelab. Change 109388118 Fix the option changed in templatize. Oops. Change 109382553 Allows setting a function name in an op's attr in the py frontend. Change 109380896 Remove assert_same_graph in favor of op_scope. Change the latter to handle tensor-like objects such as SparseTensor, IndexedSlices, and Variable. Base CL: 109418322
Diffstat (limited to 'tensorflow/python/ops/op_def_library.py')
-rw-r--r--tensorflow/python/ops/op_def_library.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tensorflow/python/ops/op_def_library.py b/tensorflow/python/ops/op_def_library.py
index c2ad3bdb58..946d543b44 100644
--- a/tensorflow/python/ops/op_def_library.py
+++ b/tensorflow/python/ops/op_def_library.py
@@ -616,6 +616,10 @@ class OpDefLibrary(object):
elif attr_def.type == "list(tensor)":
attr_value.list.tensor.extend(
[_MakeTensor(x, key) for x in value])
+ elif attr_def.type == "func":
+ if not isinstance(value, compat.bytes_or_text_types):
+ raise TypeError("Expects a string for the func name")
+ attr_value.func.name = value
else:
raise TypeError("Unrecognized Attr type " + attr_def.type)