Skip to content

Commit

Permalink
Add random crops while training
Browse files Browse the repository at this point in the history
  • Loading branch information
titu1994 committed Jan 5, 2018
1 parent 1177b4f commit 6fba4d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
def parse_data(filename, scores):
image = tf.read_file(filename)
image = tf.image.decode_jpeg(image, channels=3)
image = tf.image.resize_images(image, (IMAGE_SIZE, IMAGE_SIZE))
image = tf.image.resize_images(image, (256, 256))
image = tf.random_crop(image, size=(IMAGE_SIZE, IMAGE_SIZE, 3))
image = tf.image.random_flip_left_right(image)
image = (tf.cast(image, tf.float32) - 127.5) / 127.5
return image, scores
Expand Down
Binary file modified weights/mobilenet_weights.h5
Binary file not shown.

0 comments on commit 6fba4d2

Please sign in to comment.