gradient accumulation simulates larger batch sizes without more memory

Can you train a machine like you do with a computer?

Image: Masur, CC BY-SA 3.0, via Wikimedia Commons

gradient accumulation simulates larger batch sizes without more memory

Can you train a machine like you do with a computer?

Imagine you're trying to teach a dog new tricks without buying expensive treats for every single reward.

Instead of rewarding after every tiny success, you wait until the dog learns a bunch of tricks before giving it a big reward. This way, you don't need to buy as many treats.

Example

You teach your dog to sit, stay, and roll over. After it learns all these tricks, you give it a big treat.

Remember this

By rewarding after several successes, you simulate a bigger reward without needing more treats.

Related concepts

Swipe through 100 ML concepts daily

Open Pocket Polymath