4 ms·
"In GPUs the vector paths are typically 1024 bits wide, so GPUs using 32-bit floating-point data typically parallelise the training data up into a mini-batch of
by drewm1980 10y ago
"In GPUs the vector paths are typically 1024 bits wide, so GPUs using 32-bit floating-point data typically parallelise the training data up into a mini-batch of 32 samples, to create 1024-bit-wide data vectors. This mini-batch approach to synthesizing vector parallelism multiplies the number of activations by a factor of 32, growing the local storage requirement to over 2 GB."
I would think about that the other way around... batching your data is an ugly hack to get around not being able to load it all simultaneously.
- pjreddie 10y agoMini-batches are not an ugly hack, batch gradient descent is too slow since you have to go through the whole data and stochastic gradient descent is too high variance (plus you can't do cool things like batch-norm). Mini-batches give you stability and speed, the best of both worlds.
- p1esk 10y agoA brain learns one example at a time, which probably means a gradient descent is not a very good learning mechanism.
- jacquesm 10y agoThese are not brains, they are not even models of brains even if they use the word 'neuron'.
- p1esk 10y agoThat was kind of my point. Brain learns well using one example at a time. ANNs don't. Hence my conclusion.
- akyu 10y agoYou can use gradient descent one example at a time. It still works just fine. The gradients are more unstable, but you will still converge eventually.
- p1esk 10y ago"works just fine" is a relative term. I'm pretty sure when I'm learning a (new) alphabet, I don't need to see 1000 examples of each letter 100 times.
- chestervonwinch 10y agodrewm1980 is not totally incorrect, though. I don't believe that people began using batch gradient descent because they knew a priori that it had decent properties. I would venture to guess that, initially, people were constrained my memory and computational tractability and only observed after-the-fact that SGD actually worked and in fact, often worked nicer than non-stochastic descent. I'm not sure really at what point SGD was linked to stochastic approximation, and theoretical explanation of convergence behavior was really pinned down. It feels recent (see work by Leon Bottou, in particular), but I'm certainly no expert in this area. --- edits: grammar
- jg8610 10y agoSo interestingly, SGD has a nice intuitive explanation for why it is better than GD. If you compute the gradient step for all data, you're expending computational power on redundant data. You're going to get to the minimum with fewer data if you make steps as you get useful information.