Answer the question
In order to leave comments, you need to log in
What is the batch_size parameter in flow_from_directory used for?
The documentation says
batch_size: Size of the batches of data (default: 32)But, frankly, I don’t understand what will happen if you change the value from 32 to another
Answer the question
In order to leave comments, you need to log in
batch_size
- affects the average error to which the network will respond.
For example, if you take batch=1. And the "true" area is 5.
Step 1. we get the conditional shift of the weights by +10;
Step 2. get a conditional shift of weights by -2; Total +8;
Take 2.
Step 1. get a conditional shift of weights by (+10 + -2) / 2=> 4;
We're getting closer.
If you take a little, then the network will "rush" back and forth. If there is a lot, then the "hospital average" error will be very small around zero, and then it will take a long time to learn.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question