Executor failed to create kernel. Invalid argument: NodeDef mentions attr 'index_type' not in Op
Closed this issue · 4 comments
My system environment is :
Python3
Tensorflow : 1.5.0
Ubuntu 16
when I run the project, it throws an error:
2018-08-21 22:41:14.115372: E tensorflow/core/common_runtime/executor.cc:651] Executor failed to create kernel. Invalid argument: NodeDef mentions attr 'index_type' not in Op<name=Fill; signature=dims:int32, value:T -> output:T; attr=T:type>; NodeDef: MultipleGridAnchorGenerator/Meshgrid/ExpandedShape/ones = Fill[T=DT_INT32, index_type=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](MultipleGridAnchorGenerator/Meshgrid/ExpandedShape/Reshape, Postprocessor/BatchMultiClassNonMaxSuppression/map/TensorArrayUnstack_1/range/delta). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.). [[Node: MultipleGridAnchorGenerator/Meshgrid/ExpandedShape/ones = Fill[T=DT_INT32, index_type=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](MultipleGridAnchorGenerator/Meshgrid/ExpandedShape/Reshape, Postprocessor/BatchMultiClassNonMaxSuppression/map/TensorArrayUnstack_1/range/delta)]] 2018-08-21 22:41:14.148748: E tensorflow/core/common_runtime/executor.cc:651] Executor failed to create kernel. Invalid argument: NodeDef mentions attr 'index_type' not in Op<name=Fill; signature=dims:int32, value:T -> output:T; attr=T:type>; NodeDef: MultipleGridAnchorGenerator/Meshgrid/ExpandedShape/ones = Fill[T=DT_INT32, index_type=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](MultipleGridAnchorGenerator/Meshgrid/ExpandedShape/Reshape, Postprocessor/BatchMultiClassNonMaxSuppression/map/TensorArrayUnstack_1/range/delta). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.). [[Node: MultipleGridAnchorGenerator/Meshgrid/ExpandedShape/ones = Fill[T=DT_INT32, index_type=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](MultipleGridAnchorGenerator/Meshgrid/ExpandedShape/Reshape, Postprocessor/BatchMultiClassNonMaxSuppression/map/TensorArrayUnstack_1/range/delta)]] Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1350, in _do_call return fn(*args) File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1329, in _run_fn status, run_metadata) File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/errors_impl.py", line 473, in __exit__ c_api.TF_GetCode(self.status.status)) tensorflow.python.framework.errors_impl.InvalidArgumentError: NodeDef mentions attr 'index_type' not in Op<name=Fill; signature=dims:int32, value:T -> output:T; attr=T:type>; NodeDef: MultipleGridAnchorGenerator/Meshgrid/ExpandedShape/ones = Fill[T=DT_INT32, index_type=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](MultipleGridAnchorGenerator/Meshgrid/ExpandedShape/Reshape, Postprocessor/BatchMultiClassNonMaxSuppression/map/TensorArrayUnstack_1/range/delta). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.). [[Node: MultipleGridAnchorGenerator/Meshgrid/ExpandedShape/ones = Fill[T=DT_INT32, index_type=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](MultipleGridAnchorGenerator/Meshgrid/ExpandedShape/Reshape, Postprocessor/BatchMultiClassNonMaxSuppression/map/TensorArrayUnstack_1/range/delta)]]
During handling of the above exception, another exception occurred:
`
Traceback (most recent call last):
File "detection.py", line 110, in
main()
File "detection.py", line 107, in main
print(detect(args.image))
File "detection.py", line 25, in detect
boxes, scores, classes, num = obj.get_classification(image)
File "/home/loop/off-nutrition-table-extractor/detect_table_class.py", line 29, in get_classification
feed_dict={self.image_tensor: img_expanded})
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 895, in run
run_metadata_ptr)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1128, in _run
feed_dict_tensor, options, run_metadata)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1344, in _do_run
options, run_metadata)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1363, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: NodeDef mentions attr 'index_type' not in Op<name=Fill; signature=dims:int32, value:T -> output:T; attr=T:type>; NodeDef: MultipleGridAnchorGenerator/Meshgrid/ExpandedShape/ones = Fill[T=DT_INT32, index_type=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](MultipleGridAnchorGenerator/Meshgrid/ExpandedShape/Reshape, Postprocessor/BatchMultiClassNonMaxSuppression/map/TensorArrayUnstack_1/range/delta). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
[[Node: MultipleGridAnchorGenerator/Meshgrid/ExpandedShape/ones = Fill[T=DT_INT32, index_type=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](MultipleGridAnchorGenerator/Meshgrid/ExpandedShape/Reshape, Postprocessor/BatchMultiClassNonMaxSuppression/map/TensorArrayUnstack_1/range/delta)]]
Caused by op 'MultipleGridAnchorGenerator/Meshgrid/ExpandedShape/ones', defined at:
File "detection.py", line 110, in
main()
File "detection.py", line 107, in main
print(detect(args.image))
File "detection.py", line 22, in detect
obj = NutritionTableDetector()
File "/home/loop/off-nutrition-table-extractor/detect_table_class.py", line 14, in init
tf.import_graph_def(od_graph_def, name='')
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/util/deprecation.py", line 316, in new_func
return func(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/importer.py", line 554, in import_graph_def
op_def=op_def)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3160, in create_op
op_def=op_def)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 1625, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
InvalidArgumentError (see above for traceback): NodeDef mentions attr 'index_type' not in Op<name=Fill; signature=dims:int32, value:T -> output:T; attr=T:type>; NodeDef: MultipleGridAnchorGenerator/Meshgrid/ExpandedShape/ones = Fill[T=DT_INT32, index_type=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](MultipleGridAnchorGenerator/Meshgrid/ExpandedShape/Reshape, Postprocessor/BatchMultiClassNonMaxSuppression/map/TensorArrayUnstack_1/range/delta). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
[[Node: MultipleGridAnchorGenerator/Meshgrid/ExpandedShape/ones = Fill[T=DT_INT32, index_type=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](MultipleGridAnchorGenerator/Meshgrid/ExpandedShape/Reshape, Postprocessor/BatchMultiClassNonMaxSuppression/map/TensorArrayUnstack_1/range/delta)]]
Can someone help me with this @sgrpanchal31
Can you try to run the code with Python version 3.6?
I tried running it with Python 3.6, but it didn't work out...
What version of tensorflow did you use to train the model?
I think this is because of different tf versions during training and mine, as evident from victordibia/handtracking#1
We worked with version 1.8 from the beginning. Test the code on this version. If it works then fine but if it doesn't then I will try to recreate the bug on my machine.
Done...It would be better to mention the tf version in the documents!
Can close the issue now. Thanks!