#NEWLINE# def test_image_data_generator( self ) : #NEWLINE# #INDENT# for test_images in self . all_test_images : #NEWLINE# #INDENT# img_list = [ ] #NEWLINE# for im in test_images : #NEWLINE# #INDENT# img_list . append ( img_to_array ( im ) [ ( None , ... ) ] ) #NEWLINE# #UNINDENT# images = np . vstack ( img_list ) #NEWLINE# generator = ImageDataGenerator ( featurewise_center = True , samplewise_center = True , featurewise_std_normalization = True , samplewise_std_normalization = True , zca_whitening = True , rotation_range = 90.0 , width_shift_range = 0.1 , height_shift_range = 0.1 , shear_range = 0.5 , zoom_range = 0.2 , channel_shift_range = 0.0 , fill_mode = 'nearest' , cval = 0.5 , horizontal_flip = True , vertical_flip = True ) #NEWLINE# generator . fit ( images , augment = True ) #NEWLINE# tmp_folder = tempfile . mkdtemp ( prefix = 'test_images' ) #NEWLINE# for ( x , y ) in generator . flow ( images , np . arange ( images . shape [ 0 ] ) , shuffle = True , save_to_dir = tmp_folder ) : #NEWLINE# #INDENT# assert ( x . shape [ 1 : ] == images . shape [ 1 : ] ) #NEWLINE# break #NEWLINE# #UNINDENT# shutil . rmtree ( tmp_folder )