Code example error

I ran the code example from the course notes of week3, but got error, please help

@FViloria, I’m not sure where the example in the notes came from (maybe a previous version of this lecture?). But it appears to be entirely wrong.

If you want to work an example, I recommend you use the one Andrew walks through in the video lecture.

Note that it isn’t a very useful example, because it hard-codes some imaginary cost function, and includes no data labels ‘y’. So you can’t apply the example in the lecture to any real situations.

1 Like

Hi @FViloria

Are running the code on your own environment or in the course platform?

If you trying to run locally, you have to install all the packages required by yourself.

best regards

C2_W3 32.pdf (56.4 KB)
you are correct it looks like an old note, i implemented the code from the video and works fine


Generally they don’t try to maintain the lecture notes, but I’ll submit a ticket to have that slide removed.

thank you

you might be right in the lab environment the placeholder may be recognized, I’m using my own, so i can play freely

1 Like

tf.placeholder() is a reminder that the writer of the notes left for themselves, to go back and figure what real line of code to use there.