deep learning for computer vision image img_to_array(imgx reshape(( , shapeconverts it to numpy array with shape ( reshapes it to ( for batch in datagen flow(xbatch_size= )plt figure(iimgplot plt imshow(image array_to_img(batch[ ]) + if = break generates batches of randomly transformed images loops indefinitelyso you need to break the loop at some pointplt show(figure generat ion of cat pictures via random dat augment at ion if you train new network using this data-augmentation configurationthe network will never see the same input twice but the inputs it sees are still heavily intercorrelatedbecause they come from small number of original images--you can' produce new informationyou can only remix existing information as suchthis may not be enough to completely get rid of overfitting to further fight overfittingyou'll also add dropout layer to your modelright before the densely connected classifier licensed to