aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/ops/op_def_library.py
diff options
context:
space:
mode:
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)