Тёмный

136 understanding deep learning parameters batch size 

DigitalSreeni
Подписаться 104 тыс.
Просмотров 31 тыс.
50% 1

Наука

Опубликовано:

 

2 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 54   
@justinnails4883
@justinnails4883 3 года назад
Thanks for the great video. It is useful to see how batch size affects the model.
@Raulvic
@Raulvic 2 года назад
Grate Video! Thanks for the amazing playlist! One comment about the batch size analysis: usually we increase the learning rate with the same rate we increase the batch size! This seems to mitigate the convergency issue shown in your analysis.
@luciendaunas864
@luciendaunas864 3 года назад
thank you so much for the explanation and the striking demonstration!
@microcosmos9654
@microcosmos9654 4 года назад
Thank you for the great content! As always, very helpful and interesting to watch
@DigitalSreeni
@DigitalSreeni 4 года назад
My pleasure!
@saikrishnavadali05
@saikrishnavadali05 3 года назад
Amazing explanation.... and Amazing demonstration...
@MuralimohanM
@MuralimohanM 9 месяцев назад
This is a great video - I am happy i found your channel. It is amazing.!
@ai-video-stories
@ai-video-stories 2 года назад
So far the most clear and concise explaination
@DigitalSreeni
@DigitalSreeni 2 года назад
Thanks
@goelnikhils
@goelnikhils Год назад
Amazing Explanation. Great Work
@petexplorex
@petexplorex 2 года назад
Thank you very very very much,this is deliciously useful
@frankgkilima6910
@frankgkilima6910 3 года назад
Thank you. Good tutorial. Good topic, well prepared and excellently explained.
@DigitalSreeni
@DigitalSreeni 3 года назад
Glad it was helpful!
@piankk
@piankk 3 года назад
You are awesome. Thank you very much.
@hritikdj
@hritikdj 4 года назад
Great explanation sir, Thanks for sharing knowledge :)
@DigitalSreeni
@DigitalSreeni 4 года назад
Most welcome!
@seyed_mahdi
@seyed_mahdi 2 года назад
Thanks for this helpful video
@agenticmark
@agenticmark 7 месяцев назад
love your videos.
@surajshah4317
@surajshah4317 4 года назад
It's a helpful sir
@nurdanseker6575
@nurdanseker6575 2 года назад
Thank you ! Great tutorial :)
@DigitalSreeni
@DigitalSreeni 2 года назад
Glad it was helpful!
@saranyasubramanian4283
@saranyasubramanian4283 4 года назад
Very clear explanation 👍 👍
@DigitalSreeni
@DigitalSreeni 4 года назад
Glad you think so!
@vivjinturkar
@vivjinturkar 4 года назад
Thank you so much.
@DigitalSreeni
@DigitalSreeni 4 года назад
Always welcome
@rafamichalczyk6500
@rafamichalczyk6500 Год назад
Great example!
@DigitalSreeni
@DigitalSreeni Год назад
Glad you liked it
@ahmedelnahas2277
@ahmedelnahas2277 2 года назад
Thanks 🙏
@thelastone1643
@thelastone1643 2 года назад
You make the AI is simple ...
@satinathdebnath5333
@satinathdebnath5333 2 года назад
Very informative and great video. I am able to learn it first after watching these videos. While explaining the batch size you mentioned that in 1 epoch the model covers all the samples in 94 iterations. I understand that in each batch operation the weight and biases are updated for those samples and then moved forward for next batch. If by 94 iterations all the samples are already visited then what is the use of 5000 epochs? Could you please explain that too. If someone knows the answer please welcome. Thanks once again for such wonderful videos. I am an Msc student and happily learning from this source.
@farazshaikh4967
@farazshaikh4967 2 года назад
In the next epoch, the model will update its parameter again.
@jameshawkes8336
@jameshawkes8336 3 года назад
I am a little confused on how the parameters (weights) are updated after the batch has been processed. If two different observations in the training set go through the same nodes in the network, it would seem that the contribution the first observation made to changes in the weights would be lost when the second observation pass through the weights since the weights are not changed until the batch is competed. I am obviously missing something, could someone point me in the right direction.
@DigitalSreeni
@DigitalSreeni 3 года назад
Please search for backpropagation and when you look into math you may find the answer. In short, the information gets accumulated during training from individual data in a batch and then gets (summed/averaged). Same holds true for batches vs epochs.
@lakeguy65616
@lakeguy65616 Год назад
It seems to me that the optimal batch size is a function of how large the training dataset is. Using your example, you've chosen 32 as batch size with a dataset of 3000 rows. That means each batch is approximately .011% of the dataset. If your dataset was much larger, (for example: 1,000,000 rows), wouldn't that imply that you should choose a batch size of 11,000? that assumes that 11,000 rows fits within the system ram and gpu ram? Am I on the right track here? (great video!)
@SUNSZED
@SUNSZED 10 месяцев назад
The problem is that the batch size as an optimization parameter also depends on other hyperparameters that need to be trained. In addition to that it will depend on your dataset and its complexity. If you have 20K images you can easily take a 1028 (provided you have a good GPU), if you have 2000 images, its too high. If you have a dataset of 400 images, you'd aim lower batch of 4 to 32 would be appropriate
@lakeguy65616
@lakeguy65616 10 месяцев назад
@@SUNSZED I have done a little more research into this question. The correct batch size introduces an appropriate level of "noise" into the traning loop. Too much or too little noise will hinder training. This is based on personal experience.
@SUNSZED
@SUNSZED 10 месяцев назад
@@lakeguy65616 Essentially depends on the dataset, in the case of "easy" dataset, you could afford the range of "appropriate" is wide and goes on the lower side. I think there's an hyperparam optimization automation that can be activated with YOLOv5 for object detection.
@ShahidAli-bk1qg
@ShahidAli-bk1qg 2 года назад
Sir, I am still confuse in this. if we have 500 images and we want to set batch size=20 so 500/20= 25 samples in each batch and epoch size is 5 so each epoch 25 sample will be given to model as forward pass and update weights right ?. my question is after given 25 samples and what about next epoch same 25 samples are given or other 25 samples from dataset which were not shown to model ? please answer my question.
@sarabhian2270
@sarabhian2270 3 года назад
I have 100milion rows dataset , I want to do preprocessing for NLP (like tokenization , rearranging , label encoding etc..) how should I approach this problem .. pls help me
@a.k.zraselrahman260
@a.k.zraselrahman260 3 года назад
Outstanding explanation !!! I want to know why we need 200 epoch as in each epoch all 1000 data is passing through the model. Why only one epoch is not enough as each epoch use hole dataset ?
@DigitalSreeni
@DigitalSreeni 3 года назад
The solution will not converge in one epoch. You need many epochs for the model to minimize loss function to a stage where your weights and biases are appropriately adjusted for the problem you are trying to solve. If your dataset size is humongous you may have a good solution after one epoch.
@a.k.zraselrahman260
@a.k.zraselrahman260 3 года назад
itecture @@DigitalSreeni Tnank you for your kind reply. Can you please make videoes on the topics like YOLO , RCNN, Faster RCNN models ? I do not find any appropriate tutorial where someone teach from scratch .
@TheHarpanOnly
@TheHarpanOnly Год назад
And what is the timestep?
@asraajalilsaeed7435
@asraajalilsaeed7435 Год назад
Can use this code with GAN ??? And xtrain what choice? Real or fake image?
@MrMikael1337
@MrMikael1337 3 года назад
I have seen this very often, that the batch size is 2 to some power (4 ,16 ,32 , 64 etc). Any reason behind that? If you have say 3000 samples, why not use a divisible batch size, such as 50?
@DigitalSreeni
@DigitalSreeni 3 года назад
Nothing wrong in using any batch size. Your processors come with a memory that is power of 2, it makes sense to use a batch size that maximally fits your memory. This is why we choose batch sizes 2, 4, 8, 16, 32, 64, etc.
@MrMikael1337
@MrMikael1337 3 года назад
@@DigitalSreeni Makes sense. Thanks!
@merveozdas1193
@merveozdas1193 2 года назад
How can I construct h5 file?
@DigitalSreeni
@DigitalSreeni 2 года назад
After training your model using keras, you can save the model as h5 (hdf5 format). Please watch my latest video on understanding h5 files. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-_a-UYLfF6TE.html&lc=UgwIE83hIAjTpcJ_ZT54AaABAg
@SimonZimmermann82
@SimonZimmermann82 Год назад
Why is your batch size the number two to the power of n?
@SimonZimmermann82
@SimonZimmermann82 Год назад
Is it because of the pixel size of the images?
@DigitalSreeni
@DigitalSreeni Год назад
Batch size can be any number, not necessarily power of 2. But using batch sizes of power of 2 can help with optimal memory usage. Here is a discussion that may help you: datascience.stackexchange.com/questions/20179/what-is-the-advantage-of-keeping-batch-size-a-power-of-2
@SimonZimmermann82
@SimonZimmermann82 Год назад
@@DigitalSreeni thank you!
Далее
137 - What is one hot encoding in machine learning?
12:18
🤡Украли У ВСЕХ🤪
00:37
Просмотров 40 тыс.
I Built a Neural Network from Scratch
9:15
Просмотров 211 тыс.
Why The Windows Phone Failed
24:08
Просмотров 56 тыс.
181 - Multivariate time series forecasting using LSTM
22:40
The moment we stopped understanding AI [AlexNet]
17:38
Просмотров 833 тыс.
127 - Data augmentation using keras
20:10
Просмотров 71 тыс.