zoukankan      html  css  js  c++  java
  • tensorflow 模型不兼容

    [ERROR] [1533570199.196157]: bad callback: <bound method TLDetector.image_cb of <__main__.TLDetector object at 0x7f1fda105450>>
    Traceback (most recent call last):
      File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/topics.py", line 750, in _invoke_callback
        cb(msg)
      File "/home/novak/Carnd3/wow-now/ros/src/tl_detector/tl_detector.py", line 148, in image_cb
        light_wp, state = self.process_traffic_lights()
      File "/home/novak/Carnd3/wow-now/ros/src/tl_detector/tl_detector.py", line 317, in process_traffic_lights
        state = self.get_light_state(light)
      File "/home/novak/Carnd3/wow-now/ros/src/tl_detector/tl_detector.py", line 275, in get_light_state
        return self.light_classifier.get_classification(cv_image)
      File "/home/novak/Carnd3/wow-now/ros/src/tl_detector/light_classification/tl_classifier.py", line 69, in get_classification
        feed_dict={self.image_tensor: image_exp})
      File "/home/novak/tensorflow1.3/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 895, in run
        run_metadata_ptr)
      File "/home/novak/tensorflow1.3/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1124, in _run
        feed_dict_tensor, options, run_metadata)
      File "/home/novak/tensorflow1.3/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1321, in _do_run
        options, run_metadata)
      File "/home/novak/tensorflow1.3/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1340, in _do_call
        raise type(e)(node_def, op, message)
    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=<unknown>; 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 = TensorArrayV3[clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=<unknown>, identical_element_shapes=true, tensor_array_name="", _device="/job:localhost/replica:0/task:0/cpu:0"](Preprocessor/map/strided_slice). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
    	 [[Node: Preprocessor/map/TensorArray = TensorArrayV3[clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=<unknown>, identical_element_shapes=true, tensor_array_name="", _device="/job:localhost/replica:0/task:0/cpu:0"](Preprocessor/map/strided_slice)]]
    
    Caused by op u'Preprocessor/map/TensorArray', defined at:
      File "/home/novak/Carnd3/wow-now/ros/src/tl_detector/tl_detector.py", line 327, in <module>
        TLDetector()
      File "/home/novak/Carnd3/wow-now/ros/src/tl_detector/tl_detector.py", line 67, in __init__
        self.light_classifier = TLClassifier(self.usingSimulator)
      File "/home/novak/Carnd3/wow-now/ros/src/tl_detector/light_classification/tl_classifier.py", line 35, in __init__
        tf.import_graph_def(od_graph_def, name='')
      File "/home/novak/tensorflow1.3/local/lib/python2.7/site-packages/tensorflow/python/framework/importer.py", line 313, in import_graph_def
        op_def=op_def)
      File "/home/novak/tensorflow1.3/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2630, in create_op
        original_op=self._default_original_op, op_def=op_def)
      File "/home/novak/tensorflow1.3/local/lib/python2.7/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=<unknown>; 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 = TensorArrayV3[clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=<unknown>, identical_element_shapes=true, tensor_array_name="", _device="/job:localhost/replica:0/task:0/cpu:0"](Preprocessor/map/strided_slice). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
    	 [[Node: Preprocessor/map/TensorArray = TensorArrayV3[clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=<unknown>, identical_element_shapes=true, tensor_array_name="", _device="/job:localhost/replica:0/task:0/cpu:0"](Preprocessor/map/strided_slice)]]
    
    
  • 相关阅读:
    构建之法阅读笔记02
    四则运算2
    第一周学习进度条
    简单四则运算
    构建之法阅读笔记01
    简读《构建之法》,所想问题展示
    介绍
    典型用户和用户场景描述
    工作总结03
    工作总结02
  • 原文地址:https://www.cnblogs.com/lion-zheng/p/9434291.html
Copyright © 2011-2022 走看看