Week 1: `predict_and_sample()` is incorrect

For the Jazz assignment, the auto-grader says my predict_and_sample() is incorrect. Following the instructions, I did not use n_values. I also printed some values and they looked sensible. My output differs from the expected output, but I understand that this is normal. I don’t know how to ask a more pointed question without sharing the code, so waiting for a mentor to contact me, so I can show the code. Thank you!

Did you resolve this issue? If so, I am curious what you did to fix it.

I think so, but have to admit that I don’t remember what the resolution was…

I’m having all zeros in the output for predict_and_sample… even though the code passed all tests, and earlier the with the 100 epochs of training, the loss was about the same as what was expected. Also, it managed to come up with a non-zero midi file, sounds pretty un-jazzy (as others have also commented here in other posts).

never mind… I figured my issue out on my own… just be careful of the first argument when calling np.argmax

1 Like

Hey, had kind of a similar problem, my values are not 0 but are pretty different from the expected output. I pass all test in the previous tasks and
I get 100/100 in the grader but is it normal that there is such a variation?
In the instructions, it is said that there may be “likely different” different results…

I hard coded that num_classes value as 90 instead of n_values and removed all print statements that I was using for more general details, that resolved my issue of grader output
and yes make sure to restart kernel and run all cells.

@caltech_kerava Hi, I’m facing the similar issue, and couldn’t figure it out, can you please me with what to pass in argmax, right now i’m passing pred with axis=1