Week 3, programming assigment, exercise 7

The lines that update b1 and b2 are obviously wrong. Look again more closely. Notice how the b lines are different than the ones for W1 and W2?

Also note that it is a waste of energy to do deepcopys of the gradient values. You’re not modifying the gradients here, right? That’s the point of the deepcopy: to break the object reference to an object that you are going to modify.

Here’s a thread which explains that comment about the deepcopys.