Week 3 — Exercise 6

Hey there,

I am struggling with this exercise, as I run into the same error over and over again:

NameError Traceback (most recent call last)
in
17 print(“\033[92mAll test passed”)
18
—> 19 compute_cost_test(compute_cost, new_y_train )

NameError: name ‘new_y_train’ is not defined

There is no variable new_y_train I could modify?
The code I’m using is the following:

[Removed solution code]

Thanks in advance!

Hi, @hubort.

new_y_train is a global variable defined in exercise 3 (right after one_hot_matrix_test). Make sure you ran that cell.

If it’s not there, you may have to update your notebook.

Good luck :slight_smile:

2 Likes

Completely right, I oversaw it, but running it results in the following error:
(see hastebin, for it is 105 lines long)
https://hastebin.com/upatekazum.sql

This could be problem :slight_smile:

1 Like

:’-)
It’s always so obvious, it hurts.

1 Like

Been there :joy:

Good luck with course 3!