C5_W1_A3_Output _for_predict_and_sample_differs

My output for the predict and sample
Differ from the expected output
Although it said there are not all identical. Mine seems to be quite far apart. It still led me to Music playing though.
Please let me know if this is still correct. Thanks.

My Output

Shape of indices (50, 1)

np.argmax(results[12]) = 60
np.argmax(results[17]) = 43
list(indices[12:18]) = [array([60]), array([40]), array([30]), array([47]), array([7]), array([43])]

You should very likely observe a sequence of indices that are not all identical. Perhaps with the following values:

Actual Output

np.argmax(results[12]) = 26
np.argmax(results[17]) = 7
list(indices[12:18]) = [array([26]), array([18]), array([53]), array([27]), array([40]), array([7])]

I think it is correct. Please check your code carefully!

Nothing in the results you posted indicate whether it is good or bad.

Important questions:

  • Does your code pass all of the unit tests in the notebook?
  • Does your code pass the grader?

Hello TMosh,

Thanks for replying.

My code passes all the unit tests in the notebook, and all results matches. And the program ran to the end, where it can play some jazz music. Except for this last part, the results look quite different from the one provided. So, checking to see since it said that the result could be different than the one provided.
I have not submitted the assignment yet.

Phuc,

Thank you for replying.

The program did pass all tests except this last one. Usually, the output results match exactly. The result varies this time, maybe there was no random seed provided.

I think that’s normal for this assignment. We don’t want the system to generate exactly the same music every time.