Mini Batch Gradient Descent Python Code