Hi Tata_P!
I request you to post your queries under specific tags so that you can get help quickly and your post doesn’t get lost in the lot. For example, if the query is regarding some assignment in the MLS, then post it under MLS (Specify course and assignment number too) not in general discussions.
And coming to your question, you are making this silly mistake here so that you are getting a different answer :

-(1/m)*(y[i]*np.log(f_wb_i) + (1-y[i])*np.log(1-f_wb_i)) is equivalent to (1/m)*(-y[i]*np.log(f_wb_i) - (1-y[i])*np.log(1-f_wb_i)) ,
not (y[i]*np.log(f_wb_i) - (1-y[i])*np.log(1-f_wb_i)). Else, the implementation is the same, so it doesn’t matter if you are multiplying -1 outside or inside.