Batch size, Epoch , Steps per epoch and Generator

How exactly are images being passed give batch size of 3 here and epoch as 20 in the provided generator? I know about generator but still a little confusion how a set of 3 pictures are going and all getting covered if . Also what exactly is step per epoch? I want a visualisation of how images are going in the model.

hey @nikhil_sarda ,
if you have a look then you will find that we are getting the descriptions for images passed in the model.
so for example say that each image has 10 descriptions , and then passing 3 images means , we are actually passing 30 such combinations .
Steps per epoch means , how many steps to be taken in epoch.
means , here at each step we are training our model on those 30 combinations.

so lets say steps per epoch are 200 and 20 total epochs .
means , 200*30 = 6000 combinations are in total being passed in each epoch to the model to understand and train it.

this repeats for 20 such iterations.

I hope this helps.

Thanks, got it. Can you also explain the error in the code please?

“ValueError: Layer model_1 expects 2 input(s), but it received 3 input tensors. Inputs received: [<tf.Tensor ‘IteratorGetNext:0’ shape=(None, None) dtype=float32>, <tf.Tensor ‘IteratorGetNext:1’ shape=(None, None) dtype=int32>, <tf.Tensor ‘IteratorGetNext:2’ shape=(None, None) dtype=float32>]”

hey @nikhil_sarda ,
its your input passing issue.
the model requires two inputs , but you are passing 3 to it.
check that what inputs you are providing.

@nikhil_sarda
Can you please help me in the code of model_fit_generator

hey @pavanit1234m_302e8a383bbe9c18 ,
What problem are you facing…
Kindly be more brief about it.

As the model.fit_generator is deprecated, i have used model_fit which i have marked as 1 using arrow in the image I have attached.
But it is giving me CustomMaskWarning which i have marked as 2 using arrow.

Actually that warning isn’t stoping the model to build.
But the model is giving very low accuracy and it is not predicting upto the mark.
Even it couldn’t predict tiger as tiger, it is predicting tiger as woman.

Can you please help me in this matter and how to obtain good accuracy in this.

I am continuously working on it, but the accuracy is too low…like its around 40 percent accuracy.

I would be so thankful if you could share the working and best accuracy giving code.

sorry brother can’t do that.

But, i guess the warning is not something that is decreasing your performance.
You might need to change your model too , and also use different approaches to tackle it and get better accuracy.
Other then that , your preprocessing on the data , batch size , the images shape , and everything matters to change your final model accuracy.

So work on that first, try them , and then see how the results varies.