BGD seems to be working

but loss is not reaching expected values
BGD works fine

Compared with my R implementation and I am getting the same results