Implement mini-batch SGD with and without gradient accumulation on a linear regression task, and compare the training dynamics.