Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
338 Views

When using the TF data api and iterators, how do you name the input?

Here is how I input data into my network:

 

iterator = TFRecordParser.input_fn(batch_size, record_path)

 

sess.run(iterator.initializer)

 

image, ground_truth = iterator.get_next()

 

prediction = network(image)

 

So "image" is the data going into my network, and "prediction" is the output. How do I name these so that I can compile with mvNCCompile?

0 Kudos
1 Reply
idata
Community Manager
81 Views

Nevermind, I figured it out. Basically, when you go to make your inference only python file, you have to delete the iterator code anyways because you don't need it. So just replace

 

image, ground_truth = iterator.get_next()

 

with

 

image = tf.placeholder(tf.float32, [None, 480, 640, 3], name="input")

 

even if you didn't use the feed_dict pattern.

Reply