ry / tensorflow-vgg16

conversation of caffe vgg16 model to tensorflow
672 stars 285 forks source link

ValueError: Attempted to map inputs that were not found in graph_def: [images:0] #3

Closed benstaf closed 8 years ago

benstaf commented 8 years ago

Hello,

I try to run the file tf_forward.py, but I get the error:

ValueError: Attempted to map inputs that were not found in graph_def: [images:0]

The code is:

import tensorflow as tf
import utils

with open("vgg16-v4.tfmodel", mode='rb') as f:
  fileContent = f.read()

graph_def = tf.GraphDef()
graph_def.ParseFromString(fileContent)

images = tf.placeholder("float", [None, 224, 224, 3])

tf.import_graph_def(graph_def, input_map={ "images": images })

tf.import_graph_def(graph_def, input_map={ "images": images }) Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/importer.py", line 283, in import_graph_def % ', '.join(unused_input_keys)) ValueError: Attempted to map inputs that were not found in graph_def: [images:0]

ry commented 8 years ago

i'm closing this because i think it was a bug in an early version. lemme know if you're still experiencing it

drcrook1 commented 7 years ago

I'm experiencing it right now dealing with TFRecords to feed_dict as the map...see stack over flow issue: http://stackoverflow.com/questions/43708616/tensorflow-inference