The total loss function always gives an error:
NameError: name ‘new_y_train’ is not defined
I used below as my code:
{moderator edit - solution code removed}
Unfortunately, the instructions in the assignment are too cryptic and another thread on this topic seems to end abruptly (for being too long) without an indication on where the new thread is. Would appreciate any guidance on this one. Thanks
Well, where is new_y_train
created? Did you run that cell? Did it succeed or fail? Note that just having the code sitting there does nothing: you actually have to run it in order for the outputs to be created.
1 Like
Much appreciate the very useful pointer!!! The problem seems with one_hot_matrix function test doesn’t assert an error for below
{moderator edit - solution code removed}
but that would prevent new_y_test and new_y_train initialization from running correctly. It could help other students if you could fix that.
Yes, I have filed a bug about the fact that the test for the one hot routine does not catch all errors.
But for the moment, you need to figure out how to fix your code so that it works not just with that one test but with the other places where the results are used. There are other threads about the “shape” argument you need in that function in order to succeed. E.g. this one.
But I’m hoping from your comment that you have already figured that out!
1 Like