Ejemplo n.º 1
0
def test_image_generator():
    # Generates an iterator over images
    with tf.compat.v1.Session() as sess:
        input_data = tf.compat.v1.data.make_one_shot_iterator(
            dataset.test(flags.data_dir)).get_next()
        try:
            while True:
                yield sess.run(input_data)
        except tf.errors.OutOfRangeError:
            pass
Ejemplo n.º 2
0
def test_image_generator():
  # Generates an iterator over images
  with tf.Session() as sess:
    input_data = tf.compat.v1.data.make_one_shot_iterator(dataset.test(
        flags.data_dir)).get_next()
    try:
      while True:
        yield sess.run(input_data)
    except tf.errors.OutOfRangeError:
      pass