Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <read files>
- image = tf.image.decode_png(file_contents)
- label = tf.string_to_number(label_str, out_type=tf.int32)
- # Batch examples here into two queues.
- image_batch, label_batch = tf.train.shuffle_batch(
- [image, label], ... )
- model = build_model(image_batch)
- loss = build_loss(model, label_batch)
- (model_output, ) = sess.run([model]) # Uses the image queue as input
- (model_output, true_labels) = sess.run([model, label_batch]) # Are image/labels pairs valid?
- train_predict = model(train_input)
- do something with the label here...
- alternate:
- use_predict = model(use_input, reuse=true)
Add Comment
Please, Sign In to add comment