0

i train dnn's with variable length input vectors. Therefore i created a dataset pipeline with TFRecord files and feature_lists. This is working. normally i'm using the feed_dict{...} to get the "answer" for a single example. With the variable input this is now very hard to realize. So i'm wondering if there is a nice way to feed the dataset pipeline with a single example without using:

dataset = tf.data.TFRecordDataset(data_path)

but instead using something different where i can put a single example in it and then process the prediction with my normal (and working) dataset-pipeline.

a workarround would be to save the single example to a TFRecord file and then read this data from a file. But I think there is a different way to do this?!

Thanks :)

Fabian
  • 21
  • 4

1 Answers1

0

You can use tf.placeholder_with_default and as default you pass the iterator.get_next() results. For more information see this post: assign iterator.get_next() as default for placeholder with default

oldsqlwnb
  • 21
  • 6