Commit 1438081e authored by Laanait, Nouamane's avatar Laanait, Nouamane

adding random crop options

parent 0ad99a75
......@@ -548,7 +548,7 @@ class DatasetLMDB(DatasetTFRecords):
# data augmentation
if self.params[self.mode + '_distort']:
with tf.device('/gpu:%i' % hvd.local_rank()):
if self.params['random_crop']:
if self.params.get('random_crop', False):
images = tf.transpose(images, perm=[0,2,3,1])
images = self.random_crop_resize(images)
images = self.add_noise_image(images)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment