Guest User

Untitled

a guest
Nov 25th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. def import_data():
  2.  
  3. image_path = tf.train.match_filenames_once("C:UsersratnoDesktophonest chaos*.JPG")
  4. filename_queue = tf.train.string_input_producer(image_path)
  5.  
  6. reader = tf.WholeFileReader()
  7.  
  8. _, content = reader.read(filename_queue)
  9. image = tf.image.decode_jpeg(content, channels=1)
  10. cropped_image = tf.image.resize_image_with_crop_or_pad(image, 3000, 3000)
  11. reduced_image = tf.image.resize_images(cropped_image, [100, 100])
  12. modified_image = tf.transpose(tf.reshape(reduced_image, [10000, 1]))
  13.  
  14. return modified_image
Add Comment
Please, Sign In to add comment