models icon indicating copy to clipboard operation
models copied to clipboard

error on compiling object_detection_tutorial

Open ElizaNami opened this issue 8 years ago • 4 comments

Please go to Stack Overflow for help and support:

http://stackoverflow.com/questions/tagged/tensorflow

Also, please understand that many of the models included in this repository are experimental and research-style code. If you open a GitHub issue, here is our policy:

  1. It must be a bug, a feature request, or a significant problem with documentation (for small docs fixes please send a PR instead).
  2. The form below must be filled out.

Here's why we have that policy: TensorFlow developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.


System information

  • What is the top-level directory of the model you are using:
  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
  • TensorFlow installed from (source or binary):
  • TensorFlow version (use command below):
  • Bazel version (if compiling from source):
  • CUDA/cuDNN version:
  • GPU model and memory:
  • Exact command to reproduce:

You can collect some of this information using our environment capture script:

https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh

You can obtain the TensorFlow version with

python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"

Describe the problem

Describe the problem clearly here. Be sure to convey here why it's a bug in TensorFlow or a feature request.

Source code / logs

Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.

ElizaNami avatar Nov 29 '18 06:11 ElizaNami

InvalidArgumentError Traceback (most recent call last) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\tensorflow\python\client\session.py in _do_call(self, fn, *args) 1326 if handle is None: -> 1327 return self._do_call(_run_fn, feeds, fetches, targets, options, 1328 run_metadata)

c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\tensorflow\python\client\session.py in _run_fn(session, feed_dict, fetch_list, target_list, options, run_metadata) 1305 -> 1306 Raises: 1307 tf.errors.OpError: Or one of its subclasses on error.

c:\users\innaeli\anaconda3\envs\tfp3.6\lib\contextlib.py in exit(self, type, value, traceback) 87 try: ---> 88 next(self.gen) 89 except StopIteration:

c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\tensorflow\python\framework\errors_impl.py in raise_exception_on_not_ok_status() 465 compat.as_text(pywrap_tensorflow.TF_Message(status)), --> 466 pywrap_tensorflow.TF_GetCode(status)) 467 finally:

InvalidArgumentError: NodeDef mentions attr 'identical_element_shapes' not in Op<name=TensorArrayV3; signature=size:int32 -> handle:resource, flow:float; attr=dtype:type; attr=element_shape:shape,default=; attr=dynamic_size:bool,default=false; attr=clear_after_read:bool,default=true; attr=tensor_array_name:string,default=""; is_stateful=true>; NodeDef: Preprocessor/map/TensorArray = TensorArrayV3clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=, identical_element_shapes=true, tensor_array_name="", _device="/job:localhost/replica:0/task:0/cpu:0". (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.). [[Node: Preprocessor/map/TensorArray = TensorArrayV3clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=, identical_element_shapes=true, tensor_array_name="", _device="/job:localhost/replica:0/task:0/cpu:0"]]

During handling of the above exception, another exception occurred:

InvalidArgumentError Traceback (most recent call last) in 8 image_np_expanded = np.expand_dims(image_np, axis=0) 9 # Actual detection. ---> 10 output_dict = run_inference_for_single_image(image_np, detection_graph) 11 # Visualization of the results of a detection. 12 vis_util.visualize_boxes_and_labels_on_image_array(

in run_inference_for_single_image(image, graph) 32 # Run inference 33 output_dict = sess.run(tensor_dict, ---> 34 feed_dict={image_tensor: np.expand_dims(image, 0)}) 35 36 # all outputs are float32 numpy arrays, so convert types as appropriate

c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\tensorflow\python\client\session.py in run(self, fetches, feed_dict, options, run_metadata) 893 on). 894 --> 895 The optional run_metadata argument expects a [RunMetadata] proto. When 896 appropriate, the non-Tensor output of this step will be collected there. For 897 example, when users turn on tracing in options, the profiled info will be

c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\tensorflow\python\client\session.py in _run(self, handle, fetches, feed_dict, options, run_metadata) 1122 1123 if (not is_tensor_handle_feed and -> 1124 not subfeed_t.get_shape().is_compatible_with(np_val.shape)): 1125 raise ValueError('Cannot feed value of shape %r for Tensor %r, ' 1126 'which has shape %r' %

c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\tensorflow\python\client\session.py in _do_run(self, handle, target_list, fetch_list, feed_dict, options, run_metadata) 1319 options, feed_dict, fetch_list, target_list, run_metadata) 1320 -> 1321 def _prun_fn(handle, feed_dict, fetch_list): 1322 if target_list: 1323 raise RuntimeError('partial_run() requires empty target_list.')

c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\tensorflow\python\client\session.py in _do_call(self, fn, *args) 1338 node_def = None 1339 op = None -> 1340 if m is not None: 1341 node_name = m.group(3) 1342 try:

InvalidArgumentError: NodeDef mentions attr 'identical_element_shapes' not in Op<name=TensorArrayV3; signature=size:int32 -> handle:resource, flow:float; attr=dtype:type; attr=element_shape:shape,default=; attr=dynamic_size:bool,default=false; attr=clear_after_read:bool,default=true; attr=tensor_array_name:string,default=""; is_stateful=true>; NodeDef: Preprocessor/map/TensorArray = TensorArrayV3clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=, identical_element_shapes=true, tensor_array_name="", _device="/job:localhost/replica:0/task:0/cpu:0". (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.). [[Node: Preprocessor/map/TensorArray = TensorArrayV3clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=, identical_element_shapes=true, tensor_array_name="", _device="/job:localhost/replica:0/task:0/cpu:0"]]

Caused by op 'Preprocessor/map/TensorArray', defined at: File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\ipykernel_launcher.py", line 16, in app.launch_new_instance() File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\traitlets\config\application.py", line 658, in launch_instance app.start() File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\ipykernel\kernelapp.py", line 505, in start self.io_loop.start() File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\tornado\platform\asyncio.py", line 132, in start self.asyncio_loop.run_forever() File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\asyncio\base_events.py", line 427, in run_forever self._run_once() File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\asyncio\base_events.py", line 1440, in _run_once handle._run() File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\asyncio\events.py", line 145, in _run self._callback(*self._args) File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\tornado\ioloop.py", line 758, in _run_callback ret = callback() File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\tornado\stack_context.py", line 300, in null_wrapper return fn(*args, **kwargs) File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\tornado\gen.py", line 1233, in inner self.run() File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\tornado\gen.py", line 1147, in run yielded = self.gen.send(value) File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\ipykernel\kernelbase.py", line 370, in dispatch_queue yield self.process_one() File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\tornado\gen.py", line 346, in wrapper runner = Runner(result, future, yielded) File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\tornado\gen.py", line 1080, in init self.run() File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\tornado\gen.py", line 1147, in run yielded = self.gen.send(value) File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\ipykernel\kernelbase.py", line 357, in process_one yield gen.maybe_future(dispatch(*args)) File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\tornado\gen.py", line 326, in wrapper yielded = next(result) File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\ipykernel\kernelbase.py", line 267, in dispatch_shell yield gen.maybe_future(handler(stream, idents, msg)) File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\tornado\gen.py", line 326, in wrapper yielded = next(result) File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\ipykernel\kernelbase.py", line 534, in execute_request user_expressions, allow_stdin, File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\tornado\gen.py", line 326, in wrapper yielded = next(result) File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\ipykernel\ipkernel.py", line 294, in do_execute res = shell.run_cell(code, store_history=store_history, silent=silent) File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\ipykernel\zmqshell.py", line 536, in run_cell return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs) File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\IPython\core\interactiveshell.py", line 2819, in run_cell raw_cell, store_history, silent, shell_futures) File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\IPython\core\interactiveshell.py", line 2845, in _run_cell return runner(coro) File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\IPython\core\async_helpers.py", line 67, in _pseudo_sync_runner coro.send(None) File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\IPython\core\interactiveshell.py", line 3020, in run_cell_async interactivity=interactivity, compiler=compiler, result=result) File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\IPython\core\interactiveshell.py", line 3185, in run_ast_nodes if (yield from self.run_code(code, result)): File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\IPython\core\interactiveshell.py", line 3267, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 8, in tf.import_graph_def(od_graph_def, name='') File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\tensorflow\python\framework\importer.py", line 313, in import_graph_def op_def=op_def) File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\tensorflow\python\framework\ops.py", line 2630, in create_op original_op=self._default_original_op, op_def=op_def) File "c:\users\innaeli\anaconda3\envs\tfp3.6\lib\site-packages\tensorflow\python\framework\ops.py", line 1204, in init self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

InvalidArgumentError (see above for traceback): NodeDef mentions attr 'identical_element_shapes' not in Op<name=TensorArrayV3; signature=size:int32 -> handle:resource, flow:float; attr=dtype:type; attr=element_shape:shape,default=; attr=dynamic_size:bool,default=false; attr=clear_after_read:bool,default=true; attr=tensor_array_name:string,default=""; is_stateful=true>; NodeDef: Preprocessor/map/TensorArray = TensorArrayV3clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=, identical_element_shapes=true, tensor_array_name="", _device="/job:localhost/replica:0/task:0/cpu:0". (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.). [[Node: Preprocessor/map/TensorArray = TensorArrayV3clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=, identical_element_shapes=true, tensor_array_name="", _device="/job:localhost/replica:0/task:0/cpu:0"]]

ElizaNami avatar Nov 30 '18 05:11 ElizaNami

now the error coming is this. what could be causing the error ?

ElizaNami avatar Nov 30 '18 05:11 ElizaNami

It's saying that "Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary". I suggest you re-exporting the model and trying it again.

pkulzc avatar Dec 02 '18 17:12 pkulzc

Hi There, We are checking to see if you still need help on this, as this seems to be considerably old issue. Please update this issue with the latest information, code snippet to reproduce your issue and error you are seeing. If we don't hear from you in the next 7 days, this issue will be closed automatically. If you don't need help on this issue any more, please consider closing this.

tensorflowbutler avatar Jan 29 '20 22:01 tensorflowbutler