#What is the purpose of batching in ML/DL?

13 messages · Page 1 of 1 (latest)

peak cedar
#

Hello, I know sometimes, we split out dataset into batches, can someone explain why pls. I understood that maybe sometimes, we don't have enough memory and that's where we split into batches but apart that, are there other benefits pls

torpid tangle
#

im still a beginner but from what I know it would take a really long time if we fed it all the data at once and it stops the model from memorizing the patterns in noise but i think its mostly about the speed and efficiency im pretty sure

river patio
#

training the data requires first load that onto ram/vram

#

generally speaking, if you have small dataset ( just for example ) you can feed all that once but again that goes into ram/vram

#

by using batches we can use all the size of ram/vram

peak cedar
#

yep I see, question though

#

how when we use batches, we prevent the model from memorizing patterns?

river patio
#

learn about Neural network firsts

peak cedar
#

yep, I do have an overview of what they do

peak cedar
earnest yacht
# peak cedar how when we use batches, we prevent the model from memorizing patterns?

it pushes the model to focus on signal (consistent patterns across batches) rather than noise (idiosyncrasies of individual samples)

in full-batch: models can precisely fit all examples (including noisy ones) because gradients (in gradient descent) are pointing exactly toward minimizing total loss

in smaller batches: each gradient updates based on only a subset of data; the model learns more general patterns that are robust across these different smaller batches

I think this is what was meant by 'stops the model from memorizing the patterns in noise'