Having issues with the practice lab assignment for the cost function it’s showing NameError X is not defined no matter what I do
Check if you are using the correct variable names. Upper-case and lower-case letters matter in Python.
Also, note that every time you open a notebook, you must run all of the cells starting from the top.
Thank you ![]()
Because of what you said I saw my mistake and passed with full marks
Dear @MATT20,
I hope you’ve resolved the issue. If you’re still experiencing difficulties, please send your notebook file via DM for further assistance.
–
Keep Learning AI with DeepLearning.AI - Girijesh
Cell #12. Can’t compile the student’s code. Error: ValueError(‘shapes (100,5) and (2,) not aligned: 5 (dim 1) != 2 (dim 0)’)
Hi @RaheelZaman ,
The cell numbering is not an accurate reference to the code cell where the error is. You should find a unique reference #UNQ_C1, for example, at the start of a code cell.
Check if your code is using any fixed constant values, where it should be using a variable.
The tests in the notebook (and in the grader) use several different sizes of dataset for testing.
After writing the compute_cost function and running the code, and that of the cost function. I keep getting 0.007 instead of 0.693. Please what could be the cause of this, and how do I resolve it?
There is an error in your code.
Try looking at the “Hint” code in the following cells.