Cost Function Graph not having Spikes when using Mini-Batch GD in Tensorflow

But in the C2-W3 TensorFlow Assignment the phenomenon was not observed in the Final Code of Block Which Displayed the Function “Model”. Even i tried making my own different car price classifier model using a similar approach but still there were no spikes regardless of using mini-batch Gradient Descent.


It also depends on the complexity of the model and its ability to fit a particular phenomenon.

Prof Andrew is talking about what would happen in a real-life scenario, if the data and the model are too simplistic, you might not see that.

Thank you, I just figured it might be because we are taking very few samples for cost function(~10) then plotting it.

1 Like