Tag Archives: training

Tensorflow load images for training

High level (with Estimator & input_fn) and low level (with feed_dict): def input_fn(): image_list = [] label_list = [] for f_name in glob(‘/Users/shawn/Documents/*.png’): image_list.append(f_name) label = int(re.match(r’.*_(\d+).png’, f_name).group(1)) label_list.append(label) imagest = tf.convert_to_tensor(image_list, dtype=tf.string) labelst = tf.convert_to_tensor(label_list, dtype=tf.int32) input_queue = tf.train.slice_input_producer([imagest, … Continue reading

Posted in tensorflow | Tagged , , , | Leave a comment