#NEWLINE# def augment_fixed_and_dscrop_with_prepro( img , ds_transforms , augmentation_transforms , target_sizes = None , prepro_transform = tform_identity ) : #NEWLINE# #INDENT# if ( target_sizes is None ) : #NEWLINE# #INDENT# target_sizes = [ ( 53 , 53 ) for _ in xrange ( len ( ds_transforms ) ) ] #NEWLINE# #UNINDENT# augmentations_list = [ ] #NEWLINE# for tform_augment in augmentation_transforms : #NEWLINE# #INDENT# augmentation = [ fast_warp ( img , ( ( tform_ds + tform_augment ) + prepro_transform ) , output_shape = target_size , mode = 'reflect' ) . astype ( 'float32' ) for ( tform_ds , target_size ) in zip ( ds_transforms , img ) ] #NEWLINE# augmentations_list . append ( augmentation ) #NEWLINE# #UNINDENT# return augmentations_list