Regarding the error

I am not able to get a good graph of error reduction
I have shared the code and image of the graph below
pls tell me how to improve my algorithm