Skip to content

import picture to model tensorflow for training #4

@Khoa-NT

Description

@Khoa-NT

Dear sir,

Thank you so much for your tensorflow-workshop. It helps me understand clearly about tensorflow.

Would you mind if I ask you how to import pictures into model so that I can train the model with it ? Just like the example image_retraining in tensorflow.

I found your function: load_image_folder in 04 Feedforward Network.ipynb

I aslo found two code in stackoverflow but I don't understand clearly
input_1.py :


- label = input_queue[1]
- file_contents = tf.read_file(input_queue[0])
- example = tf.image.decode_png(file_contents, channels=3)
- Then use **tf.train.batch** for training. 

input_2.py:

- filenameQ = tf.train.string_input_producer(imgPaths)
- filename = filenameQ.dequeue()
- image_bytes = tf.read_file(filename)
- decoded_image = tf.image.decode_jpeg(image_bytes)
- image_queue = tf.FIFOQueue(128, [tf.uint8], None)
- enqueue_op = image_queue.enqueue(decoded_image)
- Then use **tf.train.Coordinator** and **tf.train.start_queue_runners** for training

Would you mind telling me which is the standard way to import the picture ?
I haven't seen tf.train.batch , tf.train.Coordinator and tf.train.start_queue_runners before.
I really confused cause I'm still learning how to use tensorflow

thank you and regards,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions