I just finished exercise 6 “compute_cost”, and got the “all tests passed” message. Then I moved on to the “Train the model” section that has a cell which is not labeled as “Graded function”, so I am assuming I don’t have to edit the code in it. After executing that cell, I get the error message below:

ValueError: No gradients provided for any variable: [‘Variable:0’, ‘Variable:0’, ‘Variable:0’, ‘Variable:0’, ‘Variable:0’, ‘Variable:0’].

Am I supposed to modify the content of that cell?

It’s not a question of modifying that cell, but I think this indicates that something is wrong with your previous code, e.g. the *compute_cost* function. One thing to look for is to make sure you did not use any direct “numpy” calls in your *compute_cost* implementation. The point is that we are doing TensorFlow here and when you include numpy functions, it breaks the “compute graph”, because gradients can only be automatically computed if all the nodes in the compute graph are TF functions. So if my theory is right and you used numpy in *compute_cost*, then this is probably also a failure of the unit tests for *compute_cost*: they should have thrown an error in that case.