tensorflow-datasets

How to replace the input of a saved graph, e.g. a placeholder by a Dataset iterator?

风流意气都作罢 提交于 2019-11-26 18:27:42
问题 I have a saved Tensorflow graph that consumes input through a placeholder with a feed_dict param. sess.run(my_tensor, feed_dict={input_image: image}) Because feeding data with a Dataset Iterator is more efficient, I want to load the saved graph, replace the input_image placeholder with an Iterator and run. How can I do that? Is there a better way to do it? An answer with code example would be highly appreciated. 回答1: You can achieve that by serializing your graph and reimport it using tf

TensorFlow: training on my own image

五迷三道 提交于 2019-11-26 15:05:43
问题 I am new to TensorFlow. I am looking for the help on the image recognition where I can train my own image dataset. Is there any example for training the new dataset? 回答1: If you are interested in how to input your own data in TensorFlow, you can look at this tutorial. I've also written a guide with best practices for CS230 at Stanford here. New answer (with tf.data ) and with labels With the introduction of tf.data in r1.4 , we can create a batch of images without placeholders and without

Meaning of buffer_size in Dataset.map , Dataset.prefetch and Dataset.shuffle

心不动则不痛 提交于 2019-11-26 12:42:31
As per TensorFlow documentation , the prefetch and map methods of tf.contrib.data.Dataset class, both have a parameter called buffer_size . For prefetch method, the parameter is known as buffer_size and according to documentation : buffer_size: A tf.int64 scalar tf.Tensor, representing the maximum number elements that will be buffered when prefetching. For the map method, the parameter is known as output_buffer_size and according to documentation : output_buffer_size: (Optional.) A tf.int64 scalar tf.Tensor, representing the maximum number of processed elements that will be buffered. Similarly

Meaning of buffer_size in Dataset.map , Dataset.prefetch and Dataset.shuffle

99封情书 提交于 2019-11-26 03:04:07
问题 As per TensorFlow documentation , the prefetch and map methods of tf.contrib.data.Dataset class, both have a parameter called buffer_size . For prefetch method, the parameter is known as buffer_size and according to documentation : buffer_size: A tf.int64 scalar tf.Tensor, representing the maximum number elements that will be buffered when prefetching. For the map method, the parameter is known as output_buffer_size and according to documentation : output_buffer_size: (Optional.) A tf.int64