RuntimeError: tf.placeholder() is not compatible with eager execution

前端 未结 4 1615
暖寄归人
暖寄归人 2021-02-02 07:14

I have upgraded with tf_upgrade_v2 TF1 code to TF2. I\'m a noob with both. I got the next error:

RuntimeError: tf.placeholder() is not compatible with eager exec         


        
4条回答
  •  不要未来只要你来
    2021-02-02 07:59

    If you are getting this error while doing object detection using TensorFlow model then use exporter_main_v2.py instead of export_inference_graph.py for exporting the model. This is right method to do. If you just off eager_execution then it will solve this error but generate other.

    Also note that there are some parameter change like hear you will specify the path to directory of checkpoint instead of path to checkpoint. refer to this document for how to do object detection with TensorFlow V2

提交回复
热议问题