deep learning for computer vision target_size=( )batch_size= class_mode='binary'understanding python generat ors python generator is an object that acts as an iteratorit' an object you can use with the for in operator generators are built using the yield operator here is an example of generator that yields integersdef generator() while truei + yield for item in generator()print(itemif item break it prints this let' look at the output of one of these generatorsit yields batches of rgb images (shape ( )and binary labels (shape ( ,)there are samples in each batch (the batch sizenote that the generator yields these batches indefinitelyit loops endlessly over the images in the target folder for this reasonyou need to break the iteration loop at some pointfor data_batchlabels_batch in train_generatorprint('data batch shape:'data_batch shapeprint('labels batch shape:'labels_batch shapebreak data batch shape( labels batch shape( ,let' fit the model to the data using the generator you do so using the fit_generator methodthe equivalent of fit for data generators like this one it expects as its first argument python generator that will yield batches of inputs and targets indefinitelylike this one does because the data is being generated endlesslythe keras model needs to know how many samples to draw from the generator before declaring an epoch over this is the role of the steps_per_epoch argumentafter having drawn steps_per_epoch batches from the generator--that isafter having run for licensed to