Incompatible GraphDef versions in Extend
Question: I have some code which creates a graph to process some images and then
iterates `sess.run()` in a loop to fetch batches of image tensors of shape [*,
299, 299, 3]. I'd like to then feed these images into the inception model.

So, I added some code to load the inception model:

    
    
    def create_graph():
        """"Creates a graph from saved GraphDef file and returns a saver."""
        # Creates graph from saved graph_def.pb.
        print 'Loading graph...'
        with tf.Session() as sess:
            with gfile.FastGFile('/web/tensorflow_transfer/resources/classify_image_graph_def.pb', 'rb') as f:
                graph_def = tf.GraphDef()
                graph_def.ParseFromString(f.read())
                _ = tf.import_graph_def(graph_def, name='')
        return sess.graph
    
    g = create_graph()
    
    for i in range(training_steps):
      sess.run(...)
    

Now Im getting this error when running `run()`:

    
    
      File "/usr/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 368, in run
        results = self._do_run(target_list, unique_fetch_targets, feed_dict_string)
      File "/usr/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 420, in _do_run
        raise RuntimeError(compat.as_text(tf_session.TF_Message(status)))
    RuntimeError: Incompatible GraphDef versions in Extend: 1 != 0
    


Answer: This is most likely from using too old a version of TensorFlow to read in and
run the graph -- the graph was created using a newer version of the GraphDef.
Try upgrading to 0.7 or to HEAD and then run your code again.

