Problem Solving with Arman (ML+Algo)
Why we use powers of 2 for batch sizes in neural networks training? (like 32, 64, 128, 256)
Operating systems allocate memory in fixed 2^N sized blocks (a power of 2). Aligning batch sizes to these boundaries helps the system read and write data smoothly without awkward fragmentation.
#brain_teaser #ml
1 · 42 ·