LevinJ / SSD_tensorflow_VOC

Apache License 2.0
60 stars 31 forks source link

error running eval_model and run_all_checkpoints #23

Closed twangnh closed 6 years ago

twangnh commented 6 years ago

Hi! Levin, I tried running eval_model.py with no modification, it detects the latest checkpoint file, but then throws:


Traceback (most recent call last):
  File "/home/twk/prj/ssd_levin_modify/evaluate_model.py", line 159, in <module>
    obj.run()
  File "/home/twk/prj/ssd_levin_modify/evaluate_model.py", line 148, in run
    self.__setup_eval()
  File "/home/twk/prj/ssd_levin_modify/evaluate_model.py", line 88, in __setup_eval
    variables_to_restore=variables_to_restore)
  File "/home/twk/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/contrib/slim/python/slim/evaluation.py", line 207, in evaluate_once
    config=session_config)
  File "/home/twk/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/training/evaluation.py", line 182, in _evaluate_once
    eval_step_value = _get_latest_eval_step_value(eval_ops)
  File "/home/twk/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/training/evaluation.py", line 75, in _get_latest_eval_step_value
    with ops.control_dependencies(update_ops):
  File "/home/twk/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 4304, in control_dependencies
    return get_default_graph().control_dependencies(control_inputs)
  File "/home/twk/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 4017, in control_dependencies
    c = self.as_graph_element(c)
  File "/home/twk/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3035, in as_graph_element
    return self._as_graph_element_locked(obj, allow_tensor, allow_operation)
  File "/home/twk/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3124, in _as_graph_element_locked
    types_str))
TypeError: Can not convert a tuple into a Tensor or Operation.
twangnh commented 6 years ago

turns out eval_op is a list of tuple of tensors, I flattened it to list of tensors, then it works, I dont know if it is caused by TF version